Pylint Compliance

- Modifies codebase to match conventions set by Pylint.
- Added update command to template.
This commit is contained in:
InValidFire 2021-03-30 18:42:07 -04:00
parent f928c6df20
commit 58ca231454
5 changed files with 54 additions and 30 deletions

View file

@ -7,6 +7,7 @@ import yaml
def read_logging_config(default_path="logging.yaml", env_key="LOG_CFG"):
"""Load the logging config into memory"""
path = default_path
value = os.getenv(env_key, None)
if value:
@ -15,11 +16,11 @@ def read_logging_config(default_path="logging.yaml", env_key="LOG_CFG"):
with open(path, "rt") as f:
logging_config = yaml.safe_load(f.read())
return logging_config
else:
return None
return None
def setup_logging(logging_config, default_level=logging.INFO):
"""Configure logging"""
if logging_config:
logging.config.dictConfig(logging_config)
else: