MCPcopy Index your code
hub / github.com/RustPython/RustPython / _checkLevel

Function _checkLevel

Lib/logging/__init__.py:205–215  ·  view source on GitHub ↗
(level)

Source from the content-addressed store, hash-verified

203
204
205def _checkLevel(level):
206 if isinstance(level, int):
207 rv = level
208 elif str(level) == level:
209 if level not in _nameToLevel:
210 raise ValueError("Unknown level: %r" % level)
211 rv = _nameToLevel[level]
212 else:
213 raise TypeError("Level not an integer or a valid string: %r"
214 % (level,))
215 return rv
216
217#---------------------------------------------------------------------------
218# Thread-related stuff

Callers 5

__init__Method · 0.85
setLevelMethod · 0.85
disableMethod · 0.85
__init__Method · 0.85
setLevelMethod · 0.85

Calls 2

isinstanceFunction · 0.85
strFunction · 0.85

Tested by

no test coverage detected