Skip to content

Instantly share code, notes, and snippets.

@melvinkcx
Last active June 30, 2019 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melvinkcx/336239b9bb7620cb06ce0d4cbbbc1cb7 to your computer and use it in GitHub Desktop.
Save melvinkcx/336239b9bb7620cb06ce0d4cbbbc1cb7 to your computer and use it in GitHub Desktop.
Snippet for "Why Refactoring? How to Refactor/Restructure Python Package?" https://hackernoon.com/why-refactoring-how-to-restructure-python-package-51b89aa91987
"""
in __init__.py
This is where backward compatibility code lives.
This is to ensure the refactored package supports
old way of import.
This is incomplete, we will revisit __init__.py later
"""
CONFIG_NAME = {}
def get_logging_level(*args, **kwargs):
pass
class ConfigHelper:
def get(self, *args, **kwargs):
pass
def set(self, *args, **kwargs):
pass
def _get_settings_helper(self):
pass
def get_logging_level(self):
pass
def is_logging_enabled(self):
pass
class LOGGING_LEVEL:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment