mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Annotate Python 3.8 removals (#3359)
* macpath * time.clock() * Some cgi functions * XMLParser(html) and doctype() * unicode_internal * Two sqlite3 classes hidden * fileinput bufsize arg * Treeview.selection no longer takes arguments
This commit is contained in:
@@ -8,15 +8,24 @@ if sys.version_info >= (3, 6):
|
||||
else:
|
||||
_Path = Union[Text, bytes]
|
||||
|
||||
|
||||
def input(
|
||||
files: Union[_Path, Iterable[_Path], None] = ...,
|
||||
inplace: bool = ...,
|
||||
backup: str = ...,
|
||||
bufsize: int = ...,
|
||||
mode: str = ...,
|
||||
openhook: Callable[[_Path, str], IO[AnyStr]] = ...) -> FileInput[AnyStr]: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def input(
|
||||
files: Union[_Path, Iterable[_Path], None] = ...,
|
||||
inplace: bool = ...,
|
||||
backup: str = ...,
|
||||
*,
|
||||
mode: str = ...,
|
||||
openhook: Callable[[_Path, str], IO[AnyStr]] = ...,
|
||||
) -> FileInput[AnyStr]: ...
|
||||
else:
|
||||
def input(
|
||||
files: Union[_Path, Iterable[_Path], None] = ...,
|
||||
inplace: bool = ...,
|
||||
backup: str = ...,
|
||||
bufsize: int = ...,
|
||||
mode: str = ...,
|
||||
openhook: Callable[[_Path, str], IO[AnyStr]] = ...,
|
||||
) -> FileInput[AnyStr]: ...
|
||||
|
||||
def close() -> None: ...
|
||||
def nextfile() -> None: ...
|
||||
@@ -28,15 +37,26 @@ def isfirstline() -> bool: ...
|
||||
def isstdin() -> bool: ...
|
||||
|
||||
class FileInput(Iterable[AnyStr], Generic[AnyStr]):
|
||||
def __init__(
|
||||
self,
|
||||
files: Union[None, _Path, Iterable[_Path]] = ...,
|
||||
inplace: bool = ...,
|
||||
backup: str = ...,
|
||||
bufsize: int = ...,
|
||||
mode: str = ...,
|
||||
openhook: Callable[[_Path, str], IO[AnyStr]] = ...
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(
|
||||
self,
|
||||
files: Union[None, _Path, Iterable[_Path]] = ...,
|
||||
inplace: bool = ...,
|
||||
backup: str = ...,
|
||||
*,
|
||||
mode: str = ...,
|
||||
openhook: Callable[[_Path, str], IO[AnyStr]] = ...
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
files: Union[None, _Path, Iterable[_Path]] = ...,
|
||||
inplace: bool = ...,
|
||||
backup: str = ...,
|
||||
bufsize: int = ...,
|
||||
mode: str = ...,
|
||||
openhook: Callable[[_Path, str], IO[AnyStr]] = ...
|
||||
) -> None: ...
|
||||
|
||||
def __del__(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user