Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Logger.getChild subclass compatible typehint
  • Loading branch information
Randolf Scholz committed Dec 16, 2021
commit 42e61612c2398709095af6c1c2b849aa4898fb0f
3 changes: 2 additions & 1 deletion stdlib/logging/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ _ArgsType = Union[Tuple[object, ...], Mapping[str, object]]
_FilterType = Union[Filter, Callable[[LogRecord], int]]
_Level = Union[int, str]
_FormatStyle = Literal["%", "{", "$"]
_LoggerType = TypeVar("_LoggerType", bound=Logger)

raiseExceptions: bool
logThreads: bool
Expand Down Expand Up @@ -59,7 +60,7 @@ class Logger(Filterer):
def setLevel(self, level: _Level) -> None: ...
def isEnabledFor(self, level: int) -> bool: ...
def getEffectiveLevel(self) -> int: ...
def getChild(self, suffix: str) -> Logger: ...
def getChild(self: _LoggerType, suffix: str) -> _LoggerType: ...
Comment thread
randolf-scholz marked this conversation as resolved.
Outdated
if sys.version_info >= (3, 8):
def debug(
self,
Expand Down