Replace some literal types in logging with int (#7354)

See #7258 for an extended discussion. In summary, for mypy these
would be better written as follows, but this would not work with
other type checkers:
```
CRITICAL: Final = 50
```
This commit is contained in:
Jukka Lehtosalo
2022-02-22 15:24:10 +00:00
committed by GitHub
parent 7a81bd41e9
commit 12f45c5efb

View File

@@ -290,14 +290,14 @@ class Logger(Filterer):
def hasHandlers(self) -> bool: ...
def callHandlers(self, record: LogRecord) -> None: ... # undocumented
CRITICAL: Literal[50]
FATAL: Literal[50]
ERROR: Literal[40]
WARNING: Literal[30]
WARN: Literal[30]
INFO: Literal[20]
DEBUG: Literal[10]
NOTSET: Literal[0]
CRITICAL: int
FATAL: int
ERROR: int
WARNING: int
WARN: int
INFO: int
DEBUG: int
NOTSET: int
class Handler(Filterer):
level: int # undocumented