diff --git a/adafruit_logging/__init__.py b/adafruit_logging/__init__.py index 2a8b330..2a7ce59 100644 --- a/adafruit_logging/__init__.py +++ b/adafruit_logging/__init__.py @@ -94,7 +94,7 @@ def emit(self, level: int, msg: str): # The level module-global variables get created when loaded # pylint:disable=undefined-variable -logger_cache = dict() +logger_cache = {} null_logger = None # pylint:disable=global-statement diff --git a/adafruit_logging/extensions.py b/adafruit_logging/extensions.py index 92b35b9..356ad29 100644 --- a/adafruit_logging/extensions.py +++ b/adafruit_logging/extensions.py @@ -23,7 +23,9 @@ class FileHandler(LoggingHandler): """ def __init__(self, filepath: str, mode: str = "a"): - self.logfile = open(filepath, mode, encoding="utf-8") + self.logfile = open( # pylint: disable=consider-using-with + filepath, mode, encoding="utf-8" + ) def close(self): """Closes the file"""