Fix Python 3.10.1 problems pointed out by stubtest (#6604)

Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
Sebastian Rittau
2021-12-16 16:05:45 +01:00
committed by GitHub
parent c164d21225
commit c900c0e769
5 changed files with 27 additions and 10 deletions

View File

@@ -724,8 +724,8 @@ if sys.version_info >= (3, 7):
__forward_value__: Any | None
__forward_is_argument__: bool
if sys.version_info >= (3, 9):
# The module argument was added in Python 3.9.7.
def __init__(self, arg: str, is_argument: bool = ..., module: Any | None = ...) -> None: ...
# The module and is_class arguments were added in later Python 3.9 versions.
def __init__(self, arg: str, is_argument: bool = ..., module: Any | None = ..., *, is_class: bool = ...) -> None: ...
else:
def __init__(self, arg: str, is_argument: bool = ...) -> None: ...
def _evaluate(self, globalns: dict[str, Any] | None, localns: dict[str, Any] | None) -> Any | None: ...