stdlib: add some parameter defaults (#14610)

This commit is contained in:
Jelle Zijlstra
2025-08-21 00:17:33 -07:00
committed by GitHub
parent 310c161af7
commit 02a4b07b54
14 changed files with 30 additions and 22 deletions
+4 -4
View File
@@ -161,7 +161,7 @@ class ZipFile:
def __init__(
self,
file: StrPath | _ZipWritable,
mode: Literal["w", "x"] = ...,
mode: Literal["w", "x"],
compression: int = 0,
allowZip64: bool = True,
compresslevel: int | None = None,
@@ -173,7 +173,7 @@ class ZipFile:
def __init__(
self,
file: StrPath | _ZipReadableTellable,
mode: Literal["a"] = ...,
mode: Literal["a"],
compression: int = 0,
allowZip64: bool = True,
compresslevel: int | None = None,
@@ -208,7 +208,7 @@ class ZipFile:
def __init__(
self,
file: StrPath | _ZipWritable,
mode: Literal["w", "x"] = ...,
mode: Literal["w", "x"],
compression: int = 0,
allowZip64: bool = True,
compresslevel: int | None = None,
@@ -219,7 +219,7 @@ class ZipFile:
def __init__(
self,
file: StrPath | _ZipReadableTellable,
mode: Literal["a"] = ...,
mode: Literal["a"],
compression: int = 0,
allowZip64: bool = True,
compresslevel: int | None = None,
+5 -1
View File
@@ -4,7 +4,11 @@ from re import Match
if sys.version_info >= (3, 13):
class Translator:
def __init__(self, seps: str = ...) -> None: ...
if sys.platform == "win32":
def __init__(self, seps: str = "\\/") -> None: ...
else:
def __init__(self, seps: str = "/") -> None: ...
def translate(self, pattern: str) -> str: ...
def extend(self, pattern: str) -> str: ...
def match_dirs(self, pattern: str) -> str: ...