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