Skip to content

Commit ffde451

Browse files
authored
Merge pull request #23 from adafruit/patch-fix
Linted
2 parents 3952095 + 88a6a6d commit ffde451

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

adafruit_logging/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def emit(self, level: int, msg: str):
9494
# The level module-global variables get created when loaded
9595
# pylint:disable=undefined-variable
9696

97-
logger_cache = dict()
97+
logger_cache = {}
9898
null_logger = None
9999

100100
# pylint:disable=global-statement

adafruit_logging/extensions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ class FileHandler(LoggingHandler):
2323
"""
2424

2525
def __init__(self, filepath: str, mode: str = "a"):
26-
self.logfile = open(filepath, mode, encoding="utf-8")
26+
self.logfile = open( # pylint: disable=consider-using-with
27+
filepath, mode, encoding="utf-8"
28+
)
2729

2830
def close(self):
2931
"""Closes the file"""

0 commit comments

Comments
 (0)