We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc4fca2 commit e83a31dCopy full SHA for e83a31d
src/thread/utils/config.py
@@ -35,12 +35,12 @@ def __init__(self, level: VerbosityLevel) -> None:
35
ValueError: If the level is not of a valid type.
36
"""
37
if isinstance(level, str):
38
- if level not in ['quiet', 'normal', 'verbose']:
+ if level not in VerbosityMapping.keys():
39
raise ValueError('Invalid verbosity level')
40
self.level_string = level
41
self.level_number = VerbosityMapping[level]
42
elif isinstance(level, int):
43
- if level not in [0, 1, 2]:
+ if level not in VerbosityMapping.values():
44
45
self.level_number = level
46
self.level_string = list(VerbosityMapping.keys())[level]
0 commit comments