22#
33# SPDX-License-Identifier: MIT
44
5- # noinspection PyUnresolvedReferences
65"""
76`adafruit_logging`
87================================================================================
5554
5655__version__ = "0.0.0-auto.0"
5756__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Logger.git"
58- # noinspection PyUnresolvedReferences
5957# pylint:disable=undefined-all-variable
6058__all__ = ['LEVELS' , 'NOTSET' , 'DEBUG' , 'INFO' , 'WARNING' , 'ERROR' , 'CRITICAL' ,
6159 'level_for' , 'LoggingHandler' , 'PrintHandler' , 'logger_cache' ,
7573 globals ()[__name ] = __value
7674
7775
78- def level_for (level_value ):
76+ def level_for (value ):
7977 """Convert a numeric level to the most appropriate name.
8078
81- :param int level_value : a numeric level
79+ :param int value : a numeric level
8280
8381 """
8482 for i in range (len (LEVELS )):
85- if level_value == LEVELS [i ][0 ]:
83+ if value == LEVELS [i ][0 ]:
8684 return LEVELS [i ][1 ]
87- if level_value < LEVELS [i ][0 ]:
85+ if value < LEVELS [i ][0 ]:
8886 return LEVELS [i - 1 ][1 ]
8987 return LEVELS [0 ][1 ]
9088
@@ -157,7 +155,6 @@ class Logger:
157155
158156 def __init__ (self ):
159157 """Create an instance."""
160- # noinspection PyUnresolvedReferences
161158 self ._level = NOTSET
162159 self ._handler = PrintHandler ()
163160
@@ -182,7 +179,7 @@ def addHandler(self, handler):
182179 *NOTE* this is slightly different from the CPython equivalent which adds
183180 the handler rather than replacing it.
184181
185- :param handler: the handler
182+ :param LoggingHandler handler: the handler
186183
187184 """
188185 self ._handler = handler
@@ -207,7 +204,6 @@ def debug(self, format_string, *args):
207204 :param args: arguments to ``format_string.format()``; can be empty
208205
209206 """
210- # noinspection PyUnresolvedReferences
211207 self .log (DEBUG , format_string , * args )
212208
213209 def info (self , format_string , * args ):
@@ -218,7 +214,6 @@ def info(self, format_string, *args):
218214 :param args: arguments to ``format_string.format()``; can be empty
219215
220216 """
221- # noinspection PyUnresolvedReferences
222217 self .log (INFO , format_string , * args )
223218
224219 def warning (self , format_string , * args ):
@@ -229,7 +224,6 @@ def warning(self, format_string, *args):
229224 :param args: arguments to ``format_string.format()``; can be empty
230225
231226 """
232- # noinspection PyUnresolvedReferences
233227 self .log (WARNING , format_string , * args )
234228
235229 def error (self , format_string , * args ):
@@ -240,7 +234,6 @@ def error(self, format_string, *args):
240234 :param args: arguments to ``format_string.format()``; can be empty
241235
242236 """
243- # noinspection PyUnresolvedReferences
244237 self .log (ERROR , format_string , * args )
245238
246239 def critical (self , format_string , * args ):
@@ -251,7 +244,6 @@ def critical(self, format_string, *args):
251244 :param args: arguments to ``format_string.format()``; can be empty
252245
253246 """
254- # noinspection PyUnresolvedReferences
255247 self .log (CRITICAL , format_string , * args )
256248
257249
@@ -268,7 +260,6 @@ def setLevel(self, log_level):
268260
269261 def getEffectiveLevel (self ):
270262 """Dummy implementation."""
271- # noinspection PyUnresolvedReferences
272263 return NOTSET
273264
274265 def addHandler (self , handler ):
0 commit comments