Logger.getChild subclass compatible typehint (#6609)

Co-authored-by: Randolf Scholz <rscholz@ismll.de>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Randolf Scholz
2021-12-21 03:11:42 +01:00
committed by GitHub
parent 519d70097b
commit 4f9b45ff4c

View File

@@ -1,6 +1,6 @@
import sys
import threading
from _typeshed import StrPath, SupportsWrite
from _typeshed import Self, StrPath, SupportsWrite
from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
from io import TextIOWrapper
from string import Template
@@ -59,7 +59,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: Self, suffix: str) -> Self: ... # see python/typing#980
if sys.version_info >= (3, 8):
def debug(
self,