Skip to content

Commit c2f892a

Browse files
committed
Fix stubs that assumed reexport without as
1 parent 2f49dfa commit c2f892a

File tree

19 files changed

+59
-27
lines changed

19 files changed

+59
-27
lines changed

builtins/2.7/_functools.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Stub file for the '_functools' module."""
22

3-
from typing import Any, Callable, Iterator, Optional, TypeVar, Tuple, overload
3+
from typing import Any, Callable, Dict, Iterator, Optional, TypeVar, Tuple, overload
44

55
_T = TypeVar("_T")
66

builtins/2.7/_warnings.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any
1+
from typing import Any, List
22

33
default_action = ... # type: str
44
filters = ... # type: List[tuple]

builtins/2.7/array.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Stub file for the 'array' module."""
22

33
from typing import (Any, Generic, IO, Iterable, Sequence, TypeVar,
4-
Union, overload, Iterator, Tuple, BinaryIO)
4+
Union, overload, Iterator, Tuple, BinaryIO, List)
55

66
T = TypeVar('T')
77

builtins/2.7/cPickle.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, IO
1+
from typing import Any, IO, List
22

33
HIGHEST_PROTOCOL = ... # type: int
44
compatible_formats = ... # type: List[str]

builtins/2.7/cStringIO.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Stubs for cStringIO (Python 2.7)
22
# See https://docs.python.org/2/library/stringio.html
33

4-
from typing import overload, IO, List, Iterable, Iterator, Union
4+
from typing import overload, IO, List, Iterable, Iterator, Optional, Union
55
from types import TracebackType
66

77
# TODO the typing.IO[] generics should be split into input and output.
@@ -18,7 +18,7 @@ class InputType(IO[str], Iterator[str]):
1818
def readlines(self, hint: int = -1) -> List[str]: ...
1919
def seek(self, offset: int, whence: int = ...) -> None: ...
2020
def tell(self) -> int: ...
21-
def truncate(self, size: int = ...) -> None: ...
21+
def truncate(self, size: int = ...) -> Optional[int]: ...
2222
def __iter__(self) -> 'InputType': ...
2323
def next(self) -> str: ...
2424
def reset(self) -> None: ...
@@ -37,7 +37,7 @@ class OutputType(IO[str], Iterator[str]):
3737
def readlines(self, hint: int = -1) -> List[str]: ...
3838
def seek(self, offset: int, whence: int = ...) -> None: ...
3939
def tell(self) -> int: ...
40-
def truncate(self, size: int = ...) -> None: ...
40+
def truncate(self, size: int = ...) -> Optional[int]: ...
4141
def __iter__(self) -> 'OutputType': ...
4242
def next(self) -> str: ...
4343
def reset(self) -> None: ...

builtins/2.7/select.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Stubs for the 'select' module."""
22

3-
from typing import Any, Optional, Tuple, Iterable
3+
from typing import Any, Optional, Tuple, Iterable, List
44

55
EPOLLERR = ... # type: int
66
EPOLLET = ... # type: int

builtins/3/_codecs.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Stub file for the '_codecs' module."""
22

3-
from typing import Any, AnyStr, Callable, Tuple, Optional
3+
from typing import Any, AnyStr, Callable, Tuple, Optional, Dict
44

55
import codecs
66

builtins/3/_warnings.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any
1+
from typing import Any, List
22

33
_defaultaction = ... # type: str
44
_onceregistry = ... # type: dict

builtins/3/signal.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Stub file for the 'signal' module."""
22

3-
from typing import Any, Callable, List, Tuple, Dict, Generic, Union, Optional, Iterable
3+
from typing import Any, Callable, List, Tuple, Dict, Generic, Union, Optional, Iterable, Set
44
from types import FrameType
55

66
class ItimerError(IOError): ...

stdlib/2.7/StringIO.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Stubs for StringIO (Python 2)
22

3-
from typing import Any, IO, AnyStr, Iterator, Iterable, Generic
3+
from typing import Any, IO, AnyStr, Iterator, Iterable, Generic, List
44

55
class StringIO(IO[AnyStr], Generic[AnyStr]):
66
closed = ... # type: bool

0 commit comments

Comments
 (0)