Replace Incomplete | None = None in stdlib (#14083)

This commit is contained in:
Sebastian Rittau
2025-05-16 15:43:52 +02:00
committed by GitHub
parent 5785616f7a
commit 0125fe2848
12 changed files with 50 additions and 62 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
from _typeshed import BytesPath, Incomplete, StrOrBytesPath, StrPath, Unused
from _typeshed import BytesPath, StrOrBytesPath, StrPath, Unused
from abc import abstractmethod
from collections.abc import Callable, Iterable
from distutils.command.bdist import bdist
@@ -226,4 +226,4 @@ class Command:
level: Unused = 1,
) -> None: ...
def ensure_finalized(self) -> None: ...
def dump_options(self, header: Incomplete | None = None, indent: str = "") -> None: ...
def dump_options(self, header=None, indent: str = "") -> None: ...
+2 -2
View File
@@ -1,4 +1,4 @@
from _typeshed import Incomplete, StrOrBytesPath
from _typeshed import StrOrBytesPath
from collections.abc import Sequence
from re import Pattern
from typing import ClassVar, Final, Literal
@@ -81,4 +81,4 @@ class config(Command):
self, header: str, include_dirs: Sequence[str] | None = None, library_dirs: Sequence[str] | None = None, lang: str = "c"
) -> bool: ...
def dump_file(filename: StrOrBytesPath, head: Incomplete | None = None) -> None: ...
def dump_file(filename: StrOrBytesPath, head=None) -> None: ...
+1 -2
View File
@@ -1,4 +1,3 @@
from _typeshed import Incomplete
from collections.abc import Callable
from typing import Any, ClassVar
@@ -18,4 +17,4 @@ class register(PyPIRCCommand):
def verify_metadata(self) -> None: ...
def send_metadata(self) -> None: ...
def build_post_data(self, action): ...
def post_to_server(self, data, auth: Incomplete | None = None): ...
def post_to_server(self, data, auth=None): ...
+1 -3
View File
@@ -112,9 +112,7 @@ class Distribution:
command_obj: Incomplete
have_run: Incomplete
want_user_cfg: bool
def dump_option_dicts(
self, header: Incomplete | None = None, commands: Incomplete | None = None, indent: str = ""
) -> None: ...
def dump_option_dicts(self, header=None, commands=None, indent: str = "") -> None: ...
def find_config_files(self): ...
commands: Incomplete
def parse_command_line(self): ...