Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion stdlib/@python2/Queue.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from collections import deque
from typing import Any, Deque, Generic, Optional, TypeVar

_T = TypeVar("_T")
Expand Down
3 changes: 1 addition & 2 deletions stdlib/@python2/SocketServer.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import sys
import types
from socket import SocketType
from typing import Any, BinaryIO, Callable, ClassVar, List, Optional, Text, Tuple, Type, Union
from typing import Any, BinaryIO, Callable, ClassVar, List, Optional, Text, Tuple, Union

class BaseServer:
address_family: int
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/UserString.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import collections
from typing import Any, Iterable, List, MutableSequence, Optional, Sequence, Text, Tuple, TypeVar, Union, overload

_UST = TypeVar("_UST", bound=UserString)
Expand Down
4 changes: 1 addition & 3 deletions stdlib/@python2/_bisect.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import sys
from _typeshed import SupportsLessThan
from typing import Callable, MutableSequence, Optional, Sequence, TypeVar
from typing import MutableSequence, Optional, Sequence, TypeVar

_T = TypeVar("_T")

Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/_csv.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Any, Iterable, Iterator, List, Optional, Protocol, Sequence, Text, Type, Union

QUOTE_ALL: int
Expand Down
3 changes: 1 addition & 2 deletions stdlib/@python2/_curses.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import sys
from typing import IO, Any, BinaryIO, NamedTuple, Optional, Tuple, Union, overload
from typing import IO, Any, BinaryIO, Optional, Tuple, Union, overload

_chtype = Union[str, bytes, int]

Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/_dummy_threading.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from types import FrameType, TracebackType
from typing import Any, Callable, Iterable, List, Mapping, Optional, Text, Type, TypeVar, Union

Expand Down
2 changes: 1 addition & 1 deletion stdlib/@python2/_functools.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Callable, Dict, Iterable, Optional, Tuple, TypeVar, overload
from typing import Any, Callable, Dict, Iterable, Tuple, TypeVar, overload

_T = TypeVar("_T")
_S = TypeVar("_S")
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/_heapq.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Any, Callable, Iterable, List, Optional, TypeVar

_T = TypeVar("_T")
Expand Down
2 changes: 1 addition & 1 deletion stdlib/@python2/_hotshot.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Generic, List, Tuple
from typing import Any, Tuple

def coverage(a: str) -> Any: ...
def logreader(a: str) -> LogReaderType: ...
Expand Down
3 changes: 1 addition & 2 deletions stdlib/@python2/_io.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from mmap import mmap
from types import TracebackType
from typing import IO, Any, AnyStr, BinaryIO, Iterable, Iterator, List, Optional, Text, TextIO, Tuple, Type, TypeVar, Union
from typing import IO, Any, BinaryIO, Iterable, List, Optional, Text, TextIO, Tuple, Type, TypeVar, Union

_bytearray_like = Union[bytearray, mmap]

Expand Down
2 changes: 1 addition & 1 deletion stdlib/@python2/_json.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Generic, List, Tuple
from typing import Any, Tuple

def encode_basestring_ascii(*args, **kwargs) -> str: ...
def scanstring(a, b, *args, **kwargs) -> Tuple[Any, ...]: ...
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/_random.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Tuple

# Actually Tuple[(int,) * 625]
Expand Down
2 changes: 0 additions & 2 deletions stdlib/@python2/_thread.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import sys
from threading import Thread
from types import TracebackType
from typing import Any, Callable, Dict, NoReturn, Optional, Tuple, Type

Expand Down
3 changes: 1 addition & 2 deletions stdlib/@python2/_typeshed/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

import array
import mmap
import sys
from typing import AbstractSet, Any, Container, Iterable, Protocol, Text, Tuple, TypeVar, Union
from typing import Any, Container, Iterable, Protocol, Text, Tuple, TypeVar, Union
from typing_extensions import Literal, final

_KT = TypeVar("_KT")
Expand Down
2 changes: 0 additions & 2 deletions stdlib/@python2/_typeshed/tkinter.pyi

This file was deleted.

1 change: 0 additions & 1 deletion stdlib/@python2/_warnings.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Any, Dict, List, Optional, Tuple, Type, Union, overload

default_action: str
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/_weakref.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Any, Callable, Generic, List, Optional, TypeVar, overload

_C = TypeVar("_C", bound=Callable[..., Any])
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/_weakrefset.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Any, Generic, Iterable, Iterator, MutableSet, Optional, TypeVar, Union

_S = TypeVar("_S")
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/_winreg.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from types import TracebackType
from typing import Any, Optional, Tuple, Type, Union

Expand Down
4 changes: 1 addition & 3 deletions stdlib/@python2/aifc.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import sys
from types import TracebackType
from typing import IO, Any, List, NamedTuple, Optional, Text, Tuple, Type, Union, overload
from typing import IO, Any, List, NamedTuple, Optional, Text, Tuple, Union, overload
from typing_extensions import Literal

class Error(Exception): ...
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/antigravity.pyi
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
import sys
1 change: 0 additions & 1 deletion stdlib/@python2/argparse.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import (
IO,
Any,
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/array.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Any, BinaryIO, Generic, Iterable, List, MutableSequence, Text, Tuple, TypeVar, Union, overload
from typing_extensions import Literal

Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/asynchat.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import asyncore
import socket
import sys
from abc import abstractmethod
from typing import Optional, Sequence, Tuple, Union

Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/base64.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import IO, Optional, Union

_encodable = Union[bytes, unicode]
Expand Down
3 changes: 1 addition & 2 deletions stdlib/@python2/binascii.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import sys
from typing import Text, Union
from typing import Text

# Python 2 accepts unicode ascii pretty much everywhere.
_Bytes = Text
Expand Down
5 changes: 2 additions & 3 deletions stdlib/@python2/bz2.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import io
import sys
from _typeshed import AnyPath, ReadableBuffer, WriteableBuffer
from typing import IO, Any, Iterable, List, Optional, TextIO, TypeVar, Union, overload
from typing_extensions import Literal, SupportsIndex
from typing import IO, Any, Iterable, List, Optional, TypeVar, Union
from typing_extensions import SupportsIndex

_PathOrFile = Union[AnyPath, IO[bytes]]
_T = TypeVar("_T")
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/cProfile.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from _typeshed import AnyPath
from types import CodeType
from typing import Any, Callable, Dict, Optional, Tuple, TypeVar, Union
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/cStringIO.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from abc import ABCMeta
from types import TracebackType
from typing import IO, Iterable, Iterator, List, Optional, Union, overload

# This class isn't actually abstract, but you can't instantiate it
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/calendar.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import datetime
import sys
from time import struct_time
from typing import Any, Iterable, List, Optional, Sequence, Tuple, Union

Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/cmath.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import SupportsComplex, SupportsFloat, Tuple, Union

e: float
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/code.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from types import CodeType
from typing import Any, Callable, Mapping, Optional

Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/codecs.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
import types
from abc import abstractmethod
from typing import (
Expand Down
3 changes: 1 addition & 2 deletions stdlib/@python2/contextlib.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import sys
from types import TracebackType
from typing import IO, Any, Callable, ContextManager, Iterable, Iterator, Optional, Type, TypeVar, overload
from typing import IO, Any, Callable, ContextManager, Iterable, Iterator, Optional, Type, TypeVar
from typing_extensions import Protocol

_T = TypeVar("_T")
Expand Down
3 changes: 0 additions & 3 deletions stdlib/@python2/crypt.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
import sys
from typing import List, Optional, Union

def crypt(word: str, salt: str) -> str: ...
1 change: 0 additions & 1 deletion stdlib/@python2/csv.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from _csv import (
QUOTE_ALL as QUOTE_ALL,
QUOTE_MINIMAL as QUOTE_MINIMAL,
Expand Down
3 changes: 1 addition & 2 deletions stdlib/@python2/datetime.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import sys
from time import struct_time
from typing import AnyStr, ClassVar, NamedTuple, Optional, SupportsAbs, Tuple, Type, TypeVar, Union, overload
from typing import AnyStr, ClassVar, Optional, SupportsAbs, Tuple, Type, TypeVar, Union, overload

_S = TypeVar("_S")

Expand Down
4 changes: 1 addition & 3 deletions stdlib/@python2/decimal.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import numbers
import sys
from types import TracebackType
from typing import Any, Container, Dict, List, NamedTuple, Optional, Sequence, Text, Tuple, Type, TypeVar, Union, overload
from typing import Any, Container, Dict, List, NamedTuple, Optional, Sequence, Text, Tuple, Type, TypeVar, Union

_Decimal = Union[Decimal, int]
_DecimalNew = Union[Decimal, float, Text, Tuple[int, Sequence[int], int]]
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/difflib.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import (
Any,
AnyStr,
Expand Down
2 changes: 1 addition & 1 deletion stdlib/@python2/dis.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ from opcode import (
opmap as opmap,
opname as opname,
)
from typing import IO, Any, Callable, Dict, Iterator, List, NamedTuple, Optional, Tuple, Union
from typing import Any, Callable, Dict, Iterator, List, Tuple, Union

# Strictly this should not have to include Callable, but mypy doesn't use FunctionType
# for functions (python/mypy#3171)
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/doctest.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
import types
import unittest
from typing import Any, Callable, Dict, List, NamedTuple, Optional, Tuple, Type, Union
Expand Down
2 changes: 1 addition & 1 deletion stdlib/@python2/email/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import IO, Any, AnyStr
from typing import IO, AnyStr

def message_from_string(s: AnyStr, *args, **kwargs): ...
def message_from_bytes(s: str, *args, **kwargs): ...
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/ensurepip/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Optional

def version() -> str: ...
Expand Down
3 changes: 1 addition & 2 deletions stdlib/@python2/filecmp.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import sys
from typing import Any, AnyStr, Callable, Dict, Generic, Iterable, List, Optional, Sequence, Text, Tuple, Union
from typing import AnyStr, Callable, Dict, Generic, Iterable, List, Optional, Sequence, Text, Tuple, Union

DEFAULT_IGNORES: List[str]

Expand Down
3 changes: 1 addition & 2 deletions stdlib/@python2/fileinput.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import sys
from _typeshed import AnyPath
from typing import IO, Any, AnyStr, Callable, Generic, Iterable, Iterator, Optional, Union
from typing import IO, Any, AnyStr, Callable, Generic, Iterable, Iterator, Union

def input(
files: Union[AnyPath, Iterable[AnyPath], None] = ...,
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/fractions.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from decimal import Decimal
from numbers import Integral, Rational, Real
from typing import Optional, Tuple, Type, TypeVar, Union, overload
Expand Down
4 changes: 1 addition & 3 deletions stdlib/@python2/ftplib.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import sys
from _typeshed import SupportsRead, SupportsReadline
from socket import socket
from ssl import SSLContext
from types import TracebackType
from typing import Any, BinaryIO, Callable, Dict, Iterable, Iterator, List, Optional, Text, TextIO, Tuple, Type, TypeVar, Union
from typing import Any, BinaryIO, Callable, List, Optional, Text, Tuple, Type, TypeVar, Union
from typing_extensions import Literal

_T = TypeVar("_T")
Expand Down
3 changes: 1 addition & 2 deletions stdlib/@python2/functools.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from abc import ABCMeta, abstractmethod
from typing import Any, Callable, Dict, Generic, Iterable, Optional, Sequence, Tuple, Type, TypeVar, overload
from typing import Any, Callable, Dict, Generic, Iterable, Sequence, Tuple, Type, TypeVar, overload

_AnyCallable = Callable[..., Any]

Expand Down
2 changes: 0 additions & 2 deletions stdlib/@python2/genericpath.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os
import sys
from _typeshed import AnyPath, BytesPath, StrPath, SupportsLessThanT
from typing import List, Sequence, Tuple, Union, overload
from typing_extensions import Literal
Expand Down
2 changes: 1 addition & 1 deletion stdlib/@python2/heapq.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from _typeshed import SupportsLessThan
from typing import Any, Callable, Iterable, List, Optional, Protocol, TypeVar
from typing import Callable, Iterable, List, Optional, TypeVar

_T = TypeVar("_T")

Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/hmac.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from _typeshed import ReadableBuffer
from types import ModuleType
from typing import Any, AnyStr, Callable, Optional, Union, overload
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/httplib.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import mimetools
import ssl
from typing import Any, Dict, Optional, Protocol

class HTTPMessage(mimetools.Message):
Expand Down
4 changes: 1 addition & 3 deletions stdlib/@python2/imaplib.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import subprocess
import sys
import time
from socket import socket as _socket
from ssl import SSLContext, SSLSocket
from types import TracebackType
from ssl import SSLSocket
from typing import IO, Any, Callable, Dict, List, Optional, Pattern, Text, Tuple, Type, Union
from typing_extensions import Literal

Expand Down
2 changes: 0 additions & 2 deletions stdlib/@python2/imghdr.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os
import sys
from typing import Any, BinaryIO, Callable, List, Optional, Protocol, Text, Union, overload

class _ReadableBinary(Protocol):
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/ipaddress.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Any, Container, Generic, Iterable, Iterator, Optional, SupportsInt, Tuple, TypeVar, overload

# Undocumented length constants
Expand Down
2 changes: 1 addition & 1 deletion stdlib/@python2/itertools.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Callable, Generic, Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, Union, overload
from typing import Any, Callable, Generic, Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, overload

_T = TypeVar("_T")
_S = TypeVar("_S")
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/keyword.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Sequence, Text

def iskeyword(s: Text) -> bool: ...
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/lib2to3/pgen2/token.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Dict, Text

ENDMARKER: int
Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/lib2to3/pytree.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from lib2to3.pgen2.grammar import Grammar
from typing import Any, Callable, Dict, Iterator, List, Optional, Text, Tuple, TypeVar, Union

Expand Down
1 change: 0 additions & 1 deletion stdlib/@python2/linecache.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from typing import Any, Dict, List, Optional, Text

_ModuleGlobals = Dict[str, Any]
Expand Down
2 changes: 0 additions & 2 deletions stdlib/@python2/locale.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import sys

# workaround for mypy#2010
from __builtin__ import str as _str
from decimal import Decimal
Expand Down
Loading