Manual changes of Any union to Incomplete in stubs folder (#9566)

- ClassVar[Any | None]
- Missed previous changes due to alias
- Manual review of leftover Any unions (`| Any` and `Any |`)
This commit is contained in:
Avasam
2023-02-02 09:48:41 -05:00
committed by GitHub
parent 95dc689b28
commit f1aede7162
12 changed files with 32 additions and 22 deletions

View File

@@ -4,7 +4,7 @@
from _typeshed import StrOrBytesPath
from collections.abc import Generator, Iterable
from typing import Any
from types import CodeType
from typing_extensions import Literal
from PyInstaller.building.build_main import Analysis
@@ -50,7 +50,7 @@ class PostGraphAPI:
def __name__(self) -> str: ...
# Compiled code. See stdlib.builtins.compile
@property
def co(self) -> Any: ...
def co(self) -> CodeType: ...
@property
def analysis(self) -> Analysis: ...
@property

View File

@@ -2,7 +2,8 @@
# We reference the vendored package rather than depending on the original untyped module.
# Anything not referenced in the PyInstaller stubs doesn't need to be added here.
from typing import Any, Protocol
from types import CodeType
from typing import Protocol
class _SupportsGraphident(Protocol):
graphident: str
@@ -10,7 +11,7 @@ class _SupportsGraphident(Protocol):
# code, filename and packagepath are always initialized to None. But they can be given a value later.
class Node:
# Compiled code. See stdlib.builtins.compile
code: Any | None
code: CodeType | None
filename: str | None
graphident: str
identifier: str