mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
stdlib: add some parameter defaults (#14610)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user