mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Final for logging constants (#12453)
This commit is contained in:
@@ -7,7 +7,7 @@ from re import Pattern
|
||||
from string import Template
|
||||
from time import struct_time
|
||||
from types import FrameType, TracebackType
|
||||
from typing import Any, ClassVar, Generic, Literal, Protocol, TextIO, TypeVar, overload
|
||||
from typing import Any, ClassVar, Final, Generic, Literal, Protocol, TextIO, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias, deprecated
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
@@ -236,14 +236,14 @@ class Logger(Filterer):
|
||||
def hasHandlers(self) -> bool: ...
|
||||
def callHandlers(self, record: LogRecord) -> None: ... # undocumented
|
||||
|
||||
CRITICAL: int
|
||||
FATAL: int
|
||||
ERROR: int
|
||||
WARNING: int
|
||||
WARN: int
|
||||
INFO: int
|
||||
DEBUG: int
|
||||
NOTSET: int
|
||||
CRITICAL: Final = 50
|
||||
FATAL: Final = CRITICAL
|
||||
ERROR: Final = 40
|
||||
WARNING: Final = 30
|
||||
WARN: Final = WARNING
|
||||
INFO: Final = 20
|
||||
DEBUG: Final = 10
|
||||
NOTSET: Final = 0
|
||||
|
||||
class Handler(Filterer):
|
||||
level: int # undocumented
|
||||
@@ -684,6 +684,6 @@ class StrFormatStyle(PercentStyle): # undocumented
|
||||
class StringTemplateStyle(PercentStyle): # undocumented
|
||||
_tpl: Template
|
||||
|
||||
_STYLES: dict[str, tuple[PercentStyle, str]]
|
||||
_STYLES: Final[dict[str, tuple[PercentStyle, str]]]
|
||||
|
||||
BASIC_FORMAT: str
|
||||
BASIC_FORMAT: Final[str]
|
||||
|
||||
@@ -8,16 +8,16 @@ from logging import FileHandler, Handler, LogRecord
|
||||
from re import Pattern
|
||||
from socket import SocketKind, socket
|
||||
from threading import Thread
|
||||
from typing import Any, ClassVar, Protocol, TypeVar
|
||||
from typing import Any, ClassVar, Final, Protocol, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
DEFAULT_TCP_LOGGING_PORT: int
|
||||
DEFAULT_UDP_LOGGING_PORT: int
|
||||
DEFAULT_HTTP_LOGGING_PORT: int
|
||||
DEFAULT_SOAP_LOGGING_PORT: int
|
||||
SYSLOG_UDP_PORT: int
|
||||
SYSLOG_TCP_PORT: int
|
||||
DEFAULT_TCP_LOGGING_PORT: Final[int]
|
||||
DEFAULT_UDP_LOGGING_PORT: Final[int]
|
||||
DEFAULT_HTTP_LOGGING_PORT: Final[int]
|
||||
DEFAULT_SOAP_LOGGING_PORT: Final[int]
|
||||
SYSLOG_UDP_PORT: Final[int]
|
||||
SYSLOG_TCP_PORT: Final[int]
|
||||
|
||||
class WatchedFileHandler(FileHandler):
|
||||
dev: int # undocumented
|
||||
|
||||
Reference in New Issue
Block a user