diff --git a/stdlib/2and3/pyclbr.pyi b/stdlib/2and3/pyclbr.pyi index efecf3292..0e2936058 100644 --- a/stdlib/2and3/pyclbr.pyi +++ b/stdlib/2and3/pyclbr.pyi @@ -1,3 +1,4 @@ +import sys from typing import List, Union, Sequence, Optional, Dict @@ -9,12 +10,10 @@ class Class: file: int lineno: int - def __init__(self, - module: str, - name: str, - super: Optional[List[Union[Class, str]]], - file: str, - lineno: int) -> None: ... + if sys.version_info >= (3, 7): + def __init__(self, module: str, name: str, super: Optional[List[Union[Class, str]]], file: str, lineno: int, parent: Optional[Class] = ...) -> None: ... + else: + def __init__(self, module: str, name: str, super: Optional[List[Union[Class, str]]], file: str, lineno: int) -> None: ... class Function: @@ -23,11 +22,10 @@ class Function: file: int lineno: int - def __init__(self, - module: str, - name: str, - file: str, - lineno: int) -> None: ... + if sys.version_info >= (3, 7): + def __init__(self, module: str, name: str, file: str, lineno: int, parent: Optional[Function] = ...) -> None: ... + else: + def __init__(self, module: str, name: str, file: str, lineno: int) -> None: ... def readmodule(module: str, diff --git a/tests/stubtest_whitelists/py37.txt b/tests/stubtest_whitelists/py37.txt index b6196ea3f..ecec683e8 100644 --- a/tests/stubtest_whitelists/py37.txt +++ b/tests/stubtest_whitelists/py37.txt @@ -49,8 +49,6 @@ logging.handlers.MemoryHandler.__init__ macurl2path multiprocessing.shared_memory os.utime -pyclbr.Class.__init__ -pyclbr.Function.__init__ pyexpat.XMLParserType.ExternalEntityParserCreate queue.SimpleQueue.__init__ secrets.SystemRandom.getstate diff --git a/tests/stubtest_whitelists/py38.txt b/tests/stubtest_whitelists/py38.txt index fc66969fa..d7141a7f0 100644 --- a/tests/stubtest_whitelists/py38.txt +++ b/tests/stubtest_whitelists/py38.txt @@ -120,8 +120,6 @@ pickle.Pickler.reducer_override platform.DEV_NULL profile.Profile.runcall pwd.getpwuid -pyclbr.Class.__init__ -pyclbr.Function.__init__ queue.SimpleQueue.__init__ random.Random.getrandbits random.getrandbits