mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-08 19:00:59 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from typing import Iterable, Callable, IO, AnyStr, Generic, Any, Union, Iterator, Optional
|
||||
from _typeshed import AnyPath
|
||||
import sys
|
||||
from typing import IO, Any, AnyStr, Callable, Generic, Iterable, Iterator, Optional, Union
|
||||
|
||||
from _typeshed import AnyPath
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def input(
|
||||
@@ -11,6 +12,7 @@ if sys.version_info >= (3, 8):
|
||||
mode: str = ...,
|
||||
openhook: Callable[[AnyPath, str], IO[AnyStr]] = ...,
|
||||
) -> FileInput[AnyStr]: ...
|
||||
|
||||
else:
|
||||
def input(
|
||||
files: Union[AnyPath, Iterable[AnyPath], None] = ...,
|
||||
@@ -39,7 +41,7 @@ class FileInput(Iterable[AnyStr], Generic[AnyStr]):
|
||||
backup: str = ...,
|
||||
*,
|
||||
mode: str = ...,
|
||||
openhook: Callable[[AnyPath, str], IO[AnyStr]] = ...
|
||||
openhook: Callable[[AnyPath, str], IO[AnyStr]] = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
@@ -49,9 +51,8 @@ class FileInput(Iterable[AnyStr], Generic[AnyStr]):
|
||||
backup: str = ...,
|
||||
bufsize: int = ...,
|
||||
mode: str = ...,
|
||||
openhook: Callable[[AnyPath, str], IO[AnyStr]] = ...
|
||||
openhook: Callable[[AnyPath, str], IO[AnyStr]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
def __del__(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
if sys.version_info >= (3, 2):
|
||||
@@ -70,7 +71,9 @@ class FileInput(Iterable[AnyStr], Generic[AnyStr]):
|
||||
def isstdin(self) -> bool: ...
|
||||
|
||||
def hook_compressed(filename: AnyPath, mode: str) -> IO[Any]: ...
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
def hook_encoded(encoding: str, errors: Optional[str] = ...) -> Callable[[AnyPath, str], IO[Any]]: ...
|
||||
|
||||
else:
|
||||
def hook_encoded(encoding: str) -> Callable[[AnyPath, str], IO[Any]]: ...
|
||||
|
||||
Reference in New Issue
Block a user