Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger.getChild subclass compatible typehint #6609

Merged
merged 4 commits into from
Dec 21, 2021
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
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: ...
randolf-scholz marked this conversation as resolved.
Show resolved Hide resolved
if sys.version_info >= (3, 8):
def debug(
self,
Expand Down