mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Fix stubs that assumed reexport without as
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""Stub file for the '_functools' module."""
|
||||
|
||||
from typing import Any, Callable, Iterator, Optional, TypeVar, Tuple, overload
|
||||
from typing import Any, Callable, Dict, Iterator, Optional, TypeVar, Tuple, overload
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from typing import Any, List
|
||||
|
||||
default_action = ... # type: str
|
||||
filters = ... # type: List[tuple]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Stub file for the 'array' module."""
|
||||
|
||||
from typing import (Any, Generic, IO, Iterable, Sequence, TypeVar,
|
||||
Union, overload, Iterator, Tuple, BinaryIO)
|
||||
Union, overload, Iterator, Tuple, BinaryIO, List)
|
||||
|
||||
T = TypeVar('T')
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, IO
|
||||
from typing import Any, IO, List
|
||||
|
||||
HIGHEST_PROTOCOL = ... # type: int
|
||||
compatible_formats = ... # type: List[str]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Stubs for cStringIO (Python 2.7)
|
||||
# See https://docs.python.org/2/library/stringio.html
|
||||
|
||||
from typing import overload, IO, List, Iterable, Iterator, Union
|
||||
from typing import overload, IO, List, Iterable, Iterator, Optional, Union
|
||||
from types import TracebackType
|
||||
|
||||
# TODO the typing.IO[] generics should be split into input and output.
|
||||
@@ -18,7 +18,7 @@ class InputType(IO[str], Iterator[str]):
|
||||
def readlines(self, hint: int = -1) -> List[str]: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> None: ...
|
||||
def tell(self) -> int: ...
|
||||
def truncate(self, size: int = ...) -> None: ...
|
||||
def truncate(self, size: int = ...) -> Optional[int]: ...
|
||||
def __iter__(self) -> 'InputType': ...
|
||||
def next(self) -> str: ...
|
||||
def reset(self) -> None: ...
|
||||
@@ -37,7 +37,7 @@ class OutputType(IO[str], Iterator[str]):
|
||||
def readlines(self, hint: int = -1) -> List[str]: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> None: ...
|
||||
def tell(self) -> int: ...
|
||||
def truncate(self, size: int = ...) -> None: ...
|
||||
def truncate(self, size: int = ...) -> Optional[int]: ...
|
||||
def __iter__(self) -> 'OutputType': ...
|
||||
def next(self) -> str: ...
|
||||
def reset(self) -> None: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Stubs for the 'select' module."""
|
||||
|
||||
from typing import Any, Optional, Tuple, Iterable
|
||||
from typing import Any, Optional, Tuple, Iterable, List
|
||||
|
||||
EPOLLERR = ... # type: int
|
||||
EPOLLET = ... # type: int
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Stub file for the '_codecs' module."""
|
||||
|
||||
from typing import Any, AnyStr, Callable, Tuple, Optional
|
||||
from typing import Any, AnyStr, Callable, Tuple, Optional, Dict
|
||||
|
||||
import codecs
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from typing import Any, List
|
||||
|
||||
_defaultaction = ... # type: str
|
||||
_onceregistry = ... # type: dict
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Stub file for the 'signal' module."""
|
||||
|
||||
from typing import Any, Callable, List, Tuple, Dict, Generic, Union, Optional, Iterable
|
||||
from typing import Any, Callable, List, Tuple, Dict, Generic, Union, Optional, Iterable, Set
|
||||
from types import FrameType
|
||||
|
||||
class ItimerError(IOError): ...
|
||||
|
||||
Reference in New Issue
Block a user