Skip to content

Commit 377a5d8

Browse files
committed
Pylint tweaks for the global manipulation
1 parent ea05e92 commit 377a5d8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

adafruit_logging.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ def emit(self, level, msg):
9797
logger_cache = dict()
9898
null_logger = None
9999

100-
100+
# pylint:disable=global-statement
101101
def getLogger(name):
102-
global null_logger
103102
"""Create or retrieve a logger by name.
104103
105104
:param name: the name of the logger to create/retrieve None will cause the
106105
NullLogger instance to be returned.
107106
108107
"""
108+
global null_logger
109109
if not name or name == "":
110110
if not null_logger:
111111
null_logger = NullLogger()
@@ -116,6 +116,9 @@ def getLogger(name):
116116
return logger_cache[name]
117117

118118

119+
# pylint:enable=global-statement
120+
121+
119122
class Logger:
120123
"""Provide a logging api."""
121124

0 commit comments

Comments
 (0)