stdlib: add a few more defaults (#14618)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Jelle Zijlstra
2025-08-21 13:13:06 -07:00
committed by GitHub
parent f32d9f08bd
commit 82926783a4
3 changed files with 7 additions and 5 deletions
+5 -2
View File
@@ -449,10 +449,13 @@ class ParsingError(Error):
def __init__(self, source: str) -> None: ...
else:
@overload
def __init__(self, source: str, filename: None = None) -> None: ...
def __init__(self, source: str) -> None: ...
@overload
@deprecated("The `filename` parameter removed in Python 3.12. Use `source` instead.")
def __init__(self, source: None = None, filename: str = ...) -> None: ...
def __init__(self, source: None, filename: str | None) -> None: ...
@overload
@deprecated("The `filename` parameter removed in Python 3.12. Use `source` instead.")
def __init__(self, source: None = None, *, filename: str | None) -> None: ...
def append(self, lineno: int, line: str) -> None: ...
+1 -2
View File
@@ -1,4 +1,3 @@
from _typeshed import Incomplete
from typing import ClassVar, Literal
from .. import fixer_base
@@ -13,5 +12,5 @@ class FixTupleParams(fixer_base.BaseFix):
def simplify_args(node): ...
def find_params(node): ...
def map_to_index(param_list, prefix=..., d: Incomplete | None = ...): ...
def map_to_index(param_list, prefix=[], d=None): ...
def tuple_name(param_list): ...
+1 -1
View File
@@ -1197,7 +1197,7 @@ if sys.platform != "win32":
def getcwd() -> str: ...
def getcwdb() -> bytes: ...
def chmod(path: FileDescriptorOrPath, mode: int, *, dir_fd: int | None = None, follow_symlinks: bool = ...) -> None: ...
def chmod(path: FileDescriptorOrPath, mode: int, *, dir_fd: int | None = None, follow_symlinks: bool = True) -> None: ...
if sys.platform != "win32" and sys.platform != "linux":
def chflags(path: StrOrBytesPath, flags: int, follow_symlinks: bool = True) -> None: ... # some flavors of Unix