Skip to content

Commit 4f9b45f

Browse files
randolf-scholzRandolf ScholzAkuliAlexWaygood
authored
Logger.getChild subclass compatible typehint (#6609)
Co-authored-by: Randolf Scholz <[email protected]> Co-authored-by: Akuli <[email protected]> Co-authored-by: Alex Waygood <[email protected]>
1 parent 519d700 commit 4f9b45f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/logging/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
import threading
3-
from _typeshed import StrPath, SupportsWrite
3+
from _typeshed import Self, StrPath, SupportsWrite
44
from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
55
from io import TextIOWrapper
66
from string import Template
@@ -59,7 +59,7 @@ class Logger(Filterer):
5959
def setLevel(self, level: _Level) -> None: ...
6060
def isEnabledFor(self, level: int) -> bool: ...
6161
def getEffectiveLevel(self) -> int: ...
62-
def getChild(self, suffix: str) -> Logger: ...
62+
def getChild(self: Self, suffix: str) -> Self: ... # see python/typing#980
6363
if sys.version_info >= (3, 8):
6464
def debug(
6565
self,

0 commit comments

Comments
 (0)