diff --git a/stdlib/2/BaseHTTPServer.pyi b/stdlib/2/BaseHTTPServer.pyi index 21290f34b..28fc4de04 100644 --- a/stdlib/2/BaseHTTPServer.pyi +++ b/stdlib/2/BaseHTTPServer.pyi @@ -1,5 +1,3 @@ -# Stubs for BaseHTTPServer (Python 2.7) - import mimetools import SocketServer from typing import Any, BinaryIO, Callable, Mapping, Optional, Tuple, Union diff --git a/stdlib/2/CGIHTTPServer.pyi b/stdlib/2/CGIHTTPServer.pyi index 947e0e409..393dcb832 100644 --- a/stdlib/2/CGIHTTPServer.pyi +++ b/stdlib/2/CGIHTTPServer.pyi @@ -1,5 +1,3 @@ -# Stubs for CGIHTTPServer (Python 2.7) - import SimpleHTTPServer from typing import List diff --git a/stdlib/2/Queue.pyi b/stdlib/2/Queue.pyi index 9982da949..98dda8722 100644 --- a/stdlib/2/Queue.pyi +++ b/stdlib/2/Queue.pyi @@ -1,5 +1,3 @@ -# Stubs for Queue (Python 2) - from collections import deque from typing import Any, Deque, Generic, Optional, TypeVar diff --git a/stdlib/2/SimpleHTTPServer.pyi b/stdlib/2/SimpleHTTPServer.pyi index 2b1b2924f..7e62b49e8 100644 --- a/stdlib/2/SimpleHTTPServer.pyi +++ b/stdlib/2/SimpleHTTPServer.pyi @@ -1,5 +1,3 @@ -# Stubs for SimpleHTTPServer (Python 2) - import BaseHTTPServer from StringIO import StringIO from typing import IO, Any, AnyStr, Mapping, Optional, Union diff --git a/stdlib/2/SocketServer.pyi b/stdlib/2/SocketServer.pyi index 257629a7e..08c4fca6c 100644 --- a/stdlib/2/SocketServer.pyi +++ b/stdlib/2/SocketServer.pyi @@ -1,6 +1,3 @@ -# NB: SocketServer.pyi and socketserver.pyi must remain consistent! -# Stubs for socketserver - import sys import types from socket import SocketType diff --git a/stdlib/2/StringIO.pyi b/stdlib/2/StringIO.pyi index d055e571f..4470b4fc1 100644 --- a/stdlib/2/StringIO.pyi +++ b/stdlib/2/StringIO.pyi @@ -1,5 +1,3 @@ -# Stubs for StringIO (Python 2) - from typing import IO, Any, AnyStr, Generic, Iterable, Iterator, List, Optional class StringIO(IO[AnyStr], Generic[AnyStr]): diff --git a/stdlib/2/_collections.pyi b/stdlib/2/_collections.pyi index 382243584..f97b6d5d6 100644 --- a/stdlib/2/_collections.pyi +++ b/stdlib/2/_collections.pyi @@ -1,5 +1,3 @@ -"""Stub file for the '_collections' module.""" - from typing import Any, Callable, Dict, Generic, Iterator, Optional, TypeVar, Union _K = TypeVar("_K") diff --git a/stdlib/2/_functools.pyi b/stdlib/2/_functools.pyi index eae5caa7a..6143f2a08 100644 --- a/stdlib/2/_functools.pyi +++ b/stdlib/2/_functools.pyi @@ -1,5 +1,3 @@ -"""Stub file for the '_functools' module.""" - from typing import Any, Callable, Dict, Iterable, Optional, Tuple, TypeVar, overload _T = TypeVar("_T") diff --git a/stdlib/2/_hotshot.pyi b/stdlib/2/_hotshot.pyi index 0451073ee..46c365f4b 100644 --- a/stdlib/2/_hotshot.pyi +++ b/stdlib/2/_hotshot.pyi @@ -1,8 +1,3 @@ -"""Stub file for the '_hotshot' module.""" -# This is an autogenerated file. It serves as a starting point -# for a more precise manual annotation of this module. -# Feel free to edit the source below, but remove this header when you do. - from typing import Any, Dict, Generic, List, Tuple def coverage(a: str) -> Any: ... diff --git a/stdlib/2/_sre.pyi b/stdlib/2/_sre.pyi index 1d1dac0ea..263f1da05 100644 --- a/stdlib/2/_sre.pyi +++ b/stdlib/2/_sre.pyi @@ -1,5 +1,3 @@ -"""Stub file for the '_sre' module.""" - from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union, overload CODESIZE: int diff --git a/stdlib/2/_struct.pyi b/stdlib/2/_struct.pyi index 263a9fcd9..316307eaa 100644 --- a/stdlib/2/_struct.pyi +++ b/stdlib/2/_struct.pyi @@ -1,5 +1,3 @@ -"""Stub file for the '_struct' module.""" - from typing import Any, AnyStr, Tuple class error(Exception): ... diff --git a/stdlib/2/_threading_local.pyi b/stdlib/2/_threading_local.pyi index 1a7e03de4..481d30457 100644 --- a/stdlib/2/_threading_local.pyi +++ b/stdlib/2/_threading_local.pyi @@ -1,4 +1,3 @@ -# Source: https://hg.python.org/cpython/file/2.7/Lib/_threading_local.py from typing import Any class _localbase(object): ... diff --git a/stdlib/2/cStringIO.pyi b/stdlib/2/cStringIO.pyi index f0358283a..603ce3f24 100644 --- a/stdlib/2/cStringIO.pyi +++ b/stdlib/2/cStringIO.pyi @@ -1,12 +1,7 @@ -# Stubs for cStringIO (Python 2.7) -# See https://docs.python.org/2/library/stringio.html - from abc import ABCMeta from types import TracebackType from typing import IO, Iterable, Iterator, List, Optional, Union, overload -# TODO the typing.IO[] generics should be split into input and output. - # This class isn't actually abstract, but you can't instantiate it # directly, so we might as well treat it as abstract in the stub. class InputType(IO[str], Iterator[str], metaclass=ABCMeta): diff --git a/stdlib/2/collections.pyi b/stdlib/2/collections.pyi index f2b5f629b..f6f75cb07 100644 --- a/stdlib/2/collections.pyi +++ b/stdlib/2/collections.pyi @@ -1,5 +1,3 @@ -# These are not exported. -# These are exported. from typing import ( AbstractSet, Any, diff --git a/stdlib/2/dircache.pyi b/stdlib/2/dircache.pyi index ac6732b6c..fd906f6f2 100644 --- a/stdlib/2/dircache.pyi +++ b/stdlib/2/dircache.pyi @@ -1,5 +1,3 @@ -# Source: https://hg.python.org/cpython/file/2.7/Lib/dircache.py - from typing import List, MutableSequence, Text, Union def reset() -> None: ... diff --git a/stdlib/2/distutils/archive_util.pyi b/stdlib/2/distutils/archive_util.pyi index 533130f3f..0e94d3818 100644 --- a/stdlib/2/distutils/archive_util.pyi +++ b/stdlib/2/distutils/archive_util.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.archive_util - from typing import Optional def make_archive( diff --git a/stdlib/2/distutils/bcppcompiler.pyi b/stdlib/2/distutils/bcppcompiler.pyi index dec317f81..3e432f94b 100644 --- a/stdlib/2/distutils/bcppcompiler.pyi +++ b/stdlib/2/distutils/bcppcompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.bcppcompiler - from distutils.ccompiler import CCompiler class BCPPCompiler(CCompiler): ... diff --git a/stdlib/2/distutils/ccompiler.pyi b/stdlib/2/distutils/ccompiler.pyi index 671e0ae23..831311d2c 100644 --- a/stdlib/2/distutils/ccompiler.pyi +++ b/stdlib/2/distutils/ccompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.ccompiler - from typing import Any, Callable, List, Optional, Tuple, Union _Macro = Union[Tuple[str], Tuple[str, Optional[str]]] diff --git a/stdlib/2/distutils/cmd.pyi b/stdlib/2/distutils/cmd.pyi index 8fac0c21e..b888c189f 100644 --- a/stdlib/2/distutils/cmd.pyi +++ b/stdlib/2/distutils/cmd.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.cmd - from abc import abstractmethod from distutils.dist import Distribution from typing import Any, Callable, Iterable, List, Optional, Text, Tuple, Union diff --git a/stdlib/2/distutils/core.pyi b/stdlib/2/distutils/core.pyi index 147a29608..9a3fa70fd 100644 --- a/stdlib/2/distutils/core.pyi +++ b/stdlib/2/distutils/core.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.core - from distutils.cmd import Command as Command from distutils.dist import Distribution as Distribution from distutils.extension import Extension as Extension diff --git a/stdlib/2/distutils/cygwinccompiler.pyi b/stdlib/2/distutils/cygwinccompiler.pyi index bf36fc70c..1f85b2548 100644 --- a/stdlib/2/distutils/cygwinccompiler.pyi +++ b/stdlib/2/distutils/cygwinccompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.cygwinccompiler - from distutils.unixccompiler import UnixCCompiler class CygwinCCompiler(UnixCCompiler): ... diff --git a/stdlib/2/distutils/debug.pyi b/stdlib/2/distutils/debug.pyi index 76de44772..098dc3dee 100644 --- a/stdlib/2/distutils/debug.pyi +++ b/stdlib/2/distutils/debug.pyi @@ -1,3 +1 @@ -# Stubs for distutils.debug - DEBUG: bool diff --git a/stdlib/2/distutils/dep_util.pyi b/stdlib/2/distutils/dep_util.pyi index 64d1ee748..6f779d540 100644 --- a/stdlib/2/distutils/dep_util.pyi +++ b/stdlib/2/distutils/dep_util.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.dep_util - from typing import List, Tuple def newer(source: str, target: str) -> bool: ... diff --git a/stdlib/2/distutils/dir_util.pyi b/stdlib/2/distutils/dir_util.pyi index 03db4fd7b..4c4a22102 100644 --- a/stdlib/2/distutils/dir_util.pyi +++ b/stdlib/2/distutils/dir_util.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.dir_util - from typing import List def mkpath(name: str, mode: int = ..., verbose: int = ..., dry_run: int = ...) -> List[str]: ... diff --git a/stdlib/2/distutils/dist.pyi b/stdlib/2/distutils/dist.pyi index a67d0a9d4..685423bda 100644 --- a/stdlib/2/distutils/dist.pyi +++ b/stdlib/2/distutils/dist.pyi @@ -1,4 +1,3 @@ -# Stubs for distutils.dist from distutils.cmd import Command from typing import Any, Dict, Iterable, Mapping, Optional, Text, Tuple, Type diff --git a/stdlib/2/distutils/emxccompiler.pyi b/stdlib/2/distutils/emxccompiler.pyi index 97e4a29ad..19e4023fe 100644 --- a/stdlib/2/distutils/emxccompiler.pyi +++ b/stdlib/2/distutils/emxccompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for emxccompiler - from distutils.unixccompiler import UnixCCompiler class EMXCCompiler(UnixCCompiler): ... diff --git a/stdlib/2/distutils/fancy_getopt.pyi b/stdlib/2/distutils/fancy_getopt.pyi index 02e4f93a1..8eb4c416f 100644 --- a/stdlib/2/distutils/fancy_getopt.pyi +++ b/stdlib/2/distutils/fancy_getopt.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.fancy_getopt - from typing import Any, List, Mapping, Optional, Tuple, Union, overload _Option = Tuple[str, Optional[str], str] diff --git a/stdlib/2/distutils/file_util.pyi b/stdlib/2/distutils/file_util.pyi index 37c5f59a0..018339733 100644 --- a/stdlib/2/distutils/file_util.pyi +++ b/stdlib/2/distutils/file_util.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.file_util - from typing import Optional, Sequence, Tuple def copy_file( diff --git a/stdlib/2/distutils/filelist.pyi b/stdlib/2/distutils/filelist.pyi index 4ecaebaf7..8fa55d09d 100644 --- a/stdlib/2/distutils/filelist.pyi +++ b/stdlib/2/distutils/filelist.pyi @@ -1,3 +1 @@ -# Stubs for distutils.filelist - class FileList: ... diff --git a/stdlib/2/distutils/msvccompiler.pyi b/stdlib/2/distutils/msvccompiler.pyi index 9c588ebfc..80872a6b7 100644 --- a/stdlib/2/distutils/msvccompiler.pyi +++ b/stdlib/2/distutils/msvccompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.msvccompiler - from distutils.ccompiler import CCompiler class MSVCCompiler(CCompiler): ... diff --git a/stdlib/2/distutils/spawn.pyi b/stdlib/2/distutils/spawn.pyi index 924a74e46..e12eae99b 100644 --- a/stdlib/2/distutils/spawn.pyi +++ b/stdlib/2/distutils/spawn.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.spawn - from typing import List, Optional def spawn(cmd: List[str], search_path: bool = ..., verbose: bool = ..., dry_run: bool = ...) -> None: ... diff --git a/stdlib/2/distutils/sysconfig.pyi b/stdlib/2/distutils/sysconfig.pyi index fe2f43c35..9061db75c 100644 --- a/stdlib/2/distutils/sysconfig.pyi +++ b/stdlib/2/distutils/sysconfig.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.sysconfig - from distutils.ccompiler import CCompiler from typing import Mapping, Optional, Union diff --git a/stdlib/2/distutils/text_file.pyi b/stdlib/2/distutils/text_file.pyi index 13272cf10..9872a1f25 100644 --- a/stdlib/2/distutils/text_file.pyi +++ b/stdlib/2/distutils/text_file.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.text_file - from typing import IO, List, Optional, Tuple, Union class TextFile: diff --git a/stdlib/2/distutils/unixccompiler.pyi b/stdlib/2/distutils/unixccompiler.pyi index b7a36ad51..e1d443471 100644 --- a/stdlib/2/distutils/unixccompiler.pyi +++ b/stdlib/2/distutils/unixccompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.unixccompiler - from distutils.ccompiler import CCompiler class UnixCCompiler(CCompiler): ... diff --git a/stdlib/2/distutils/util.pyi b/stdlib/2/distutils/util.pyi index 9998ede98..0086d726a 100644 --- a/stdlib/2/distutils/util.pyi +++ b/stdlib/2/distutils/util.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.util - from typing import Any, Callable, List, Mapping, Optional, Tuple def get_platform() -> str: ... diff --git a/stdlib/2/email/mime/application.pyi b/stdlib/2/email/mime/application.pyi index 1a120cf0d..4245e3e0f 100644 --- a/stdlib/2/email/mime/application.pyi +++ b/stdlib/2/email/mime/application.pyi @@ -1,5 +1,3 @@ -# Stubs for email.mime.application - from email.mime.nonmultipart import MIMENonMultipart from typing import Callable, Optional, Tuple, Union diff --git a/stdlib/2/functools.pyi b/stdlib/2/functools.pyi index 38e7d58bf..1231dd133 100644 --- a/stdlib/2/functools.pyi +++ b/stdlib/2/functools.pyi @@ -1,7 +1,3 @@ -# Stubs for functools (Python 2.7) - -# NOTE: These are incomplete! - from abc import ABCMeta, abstractmethod from typing import Any, Callable, Dict, Generic, Iterable, Optional, Sequence, Tuple, Type, TypeVar, overload diff --git a/stdlib/2/gc.pyi b/stdlib/2/gc.pyi index 695ed2a59..b1fb1acc0 100644 --- a/stdlib/2/gc.pyi +++ b/stdlib/2/gc.pyi @@ -1,5 +1,3 @@ -# Stubs for gc - from typing import Any, List, Tuple def enable() -> None: ... diff --git a/stdlib/2/getpass.pyi b/stdlib/2/getpass.pyi index 782fa42bf..784eb1a1d 100644 --- a/stdlib/2/getpass.pyi +++ b/stdlib/2/getpass.pyi @@ -1,5 +1,3 @@ -# Stubs for getpass (Python 2) - from typing import IO, Any class GetPassWarning(UserWarning): ... diff --git a/stdlib/2/hashlib.pyi b/stdlib/2/hashlib.pyi index 9b4f359b3..842804b4c 100644 --- a/stdlib/2/hashlib.pyi +++ b/stdlib/2/hashlib.pyi @@ -1,5 +1,3 @@ -# Stubs for hashlib (Python 2) - from typing import Tuple, Union _DataType = Union[str, unicode, bytearray, buffer, memoryview] diff --git a/stdlib/2/httplib.pyi b/stdlib/2/httplib.pyi index 911f0b4a1..59dc658f7 100644 --- a/stdlib/2/httplib.pyi +++ b/stdlib/2/httplib.pyi @@ -1,8 +1,3 @@ -# Stubs for httplib (Python 2) -# -# Generated by stubgen and manually massaged a bit. -# Needs lots more work! - import mimetools import ssl from typing import Any, Dict, Optional, Protocol diff --git a/stdlib/2/imp.pyi b/stdlib/2/imp.pyi index 8bd3335ef..3cd37648b 100644 --- a/stdlib/2/imp.pyi +++ b/stdlib/2/imp.pyi @@ -1,5 +1,3 @@ -"""Stubs for the 'imp' module.""" - import types from typing import IO, Any, Iterable, List, Optional, Tuple diff --git a/stdlib/2/io.pyi b/stdlib/2/io.pyi index a5711e3f8..1e29cc673 100644 --- a/stdlib/2/io.pyi +++ b/stdlib/2/io.pyi @@ -1,9 +1,3 @@ -# Stubs for io - -# Based on https://docs.python.org/2/library/io.html - -# Only a subset of functionality is included. - from typing import IO, Any, Union import _io diff --git a/stdlib/2/itertools.pyi b/stdlib/2/itertools.pyi index 343273344..59a329f72 100644 --- a/stdlib/2/itertools.pyi +++ b/stdlib/2/itertools.pyi @@ -1,7 +1,3 @@ -# Stubs for itertools - -# Based on https://docs.python.org/2/library/itertools.html - from typing import Any, Callable, Generic, Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, Union, overload _T = TypeVar("_T") diff --git a/stdlib/2/md5.pyi b/stdlib/2/md5.pyi index 1b75897d3..371f61135 100644 --- a/stdlib/2/md5.pyi +++ b/stdlib/2/md5.pyi @@ -1,5 +1,3 @@ -# Stubs for Python 2.7 md5 stdlib module - from hashlib import md5 as md5 new = md5 diff --git a/stdlib/2/mutex.pyi b/stdlib/2/mutex.pyi index f6dcf7498..532760e02 100644 --- a/stdlib/2/mutex.pyi +++ b/stdlib/2/mutex.pyi @@ -1,5 +1,3 @@ -# Source: https://hg.python.org/cpython/file/2.7/Lib/mutex.py - from typing import Any, Callable, Deque, TypeVar _ArgType = TypeVar("_ArgType") diff --git a/stdlib/2/os/path.pyi b/stdlib/2/os/path.pyi index 2fe03bb1b..207c0be78 100644 --- a/stdlib/2/os/path.pyi +++ b/stdlib/2/os/path.pyi @@ -1,4 +1,3 @@ -# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent! import os import sys from _typeshed import AnyPath, BytesPath, StrPath diff --git a/stdlib/2/os2emxpath.pyi b/stdlib/2/os2emxpath.pyi index 2fe03bb1b..207c0be78 100644 --- a/stdlib/2/os2emxpath.pyi +++ b/stdlib/2/os2emxpath.pyi @@ -1,4 +1,3 @@ -# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent! import os import sys from _typeshed import AnyPath, BytesPath, StrPath diff --git a/stdlib/2/platform.pyi b/stdlib/2/platform.pyi index e6e037804..cccb024d4 100644 --- a/stdlib/2/platform.pyi +++ b/stdlib/2/platform.pyi @@ -1,7 +1,3 @@ -# Stubs for platform (Python 2) -# -# Based on stub generated by stubgen. - from typing import Any, Optional, Tuple __copyright__: Any diff --git a/stdlib/2/random.pyi b/stdlib/2/random.pyi index 3581ecab4..059bd9360 100644 --- a/stdlib/2/random.pyi +++ b/stdlib/2/random.pyi @@ -1,11 +1,3 @@ -# Stubs for random -# Ron Murawski -# Updated by Jukka Lehtosalo - -# based on https://docs.python.org/2/library/random.html - -# ----- random classes ----- - import _random from typing import AbstractSet, Any, Callable, Iterator, List, MutableSequence, Protocol, Sequence, TypeVar, Union, overload diff --git a/stdlib/2/re.pyi b/stdlib/2/re.pyi index f0719c7c3..11e3d02fc 100644 --- a/stdlib/2/re.pyi +++ b/stdlib/2/re.pyi @@ -1,9 +1,3 @@ -# Stubs for re -# Ron Murawski -# 'bytes' support added by Jukka Lehtosalo - -# based on: http: //docs.python.org/2.7/library/re.html - from typing import ( Any, AnyStr, diff --git a/stdlib/2/rfc822.pyi b/stdlib/2/rfc822.pyi index 20cd1d639..f536568b8 100644 --- a/stdlib/2/rfc822.pyi +++ b/stdlib/2/rfc822.pyi @@ -1,7 +1,3 @@ -# Stubs for rfc822 (Python 2) -# -# Based on stub generated by stubgen. - from typing import Any, Optional class Message: diff --git a/stdlib/2/sets.pyi b/stdlib/2/sets.pyi index d3da7b268..e0a652053 100644 --- a/stdlib/2/sets.pyi +++ b/stdlib/2/sets.pyi @@ -1,4 +1,3 @@ -# Stubs for sets (Python 2) from typing import Any, Callable, Hashable, Iterable, Iterator, MutableMapping, Optional, TypeVar, Union _T = TypeVar("_T") diff --git a/stdlib/2/sha.pyi b/stdlib/2/sha.pyi index 196d37614..aac8c8bc5 100644 --- a/stdlib/2/sha.pyi +++ b/stdlib/2/sha.pyi @@ -1,5 +1,3 @@ -# Stubs for Python 2.7 sha stdlib module - class sha(object): def update(self, arg: str) -> None: ... def digest(self) -> str: ... diff --git a/stdlib/2/sre_constants.pyi b/stdlib/2/sre_constants.pyi index 6e113fa9e..bc15754d6 100644 --- a/stdlib/2/sre_constants.pyi +++ b/stdlib/2/sre_constants.pyi @@ -1,5 +1,3 @@ -# Source: https://hg.python.org/cpython/file/2.7/Lib/sre_constants.py - from typing import Dict, List, TypeVar MAGIC: int diff --git a/stdlib/2/sre_parse.pyi b/stdlib/2/sre_parse.pyi index ee5633965..e2a0be4e3 100644 --- a/stdlib/2/sre_parse.pyi +++ b/stdlib/2/sre_parse.pyi @@ -1,5 +1,3 @@ -# Source: https://hg.python.org/cpython/file/2.7/Lib/sre_parse.py - from typing import Any, Dict, Iterable, List, Match, Optional, Pattern as _Pattern, Set, Tuple, Union SPECIAL_CHARS: str diff --git a/stdlib/2/string.pyi b/stdlib/2/string.pyi index bbe1c8e11..03a6a2dfd 100644 --- a/stdlib/2/string.pyi +++ b/stdlib/2/string.pyi @@ -1,7 +1,3 @@ -# Stubs for string - -# Based on http://docs.python.org/3.2/library/string.html - from typing import Any, AnyStr, Iterable, List, Mapping, Optional, Sequence, Text, Tuple, Union, overload ascii_letters: str diff --git a/stdlib/2/stringold.pyi b/stdlib/2/stringold.pyi index ae592af64..ea11da725 100644 --- a/stdlib/2/stringold.pyi +++ b/stdlib/2/stringold.pyi @@ -1,4 +1,3 @@ -# Source: https://hg.python.org/cpython/file/2.7/Lib/stringold.py from typing import AnyStr, Iterable, List, Optional, Type whitespace: str diff --git a/stdlib/2/strop.pyi b/stdlib/2/strop.pyi index 578a47758..81035eaab 100644 --- a/stdlib/2/strop.pyi +++ b/stdlib/2/strop.pyi @@ -1,5 +1,3 @@ -"""Stub file for the 'strop' module.""" - from typing import List, Sequence lowercase: str diff --git a/stdlib/2/subprocess.pyi b/stdlib/2/subprocess.pyi index 69fa50467..b3a2e92e7 100644 --- a/stdlib/2/subprocess.pyi +++ b/stdlib/2/subprocess.pyi @@ -1,7 +1,3 @@ -# Stubs for subprocess - -# Based on http://docs.python.org/2/library/subprocess.html and Python 3 stub - from typing import IO, Any, Callable, Generic, List, Mapping, Optional, Sequence, Text, Tuple, TypeVar, Union _FILE = Union[None, int, IO[Any]] diff --git a/stdlib/2/symbol.pyi b/stdlib/2/symbol.pyi index 55d25a6b2..a3561fe6b 100644 --- a/stdlib/2/symbol.pyi +++ b/stdlib/2/symbol.pyi @@ -1,5 +1,3 @@ -# Stubs for symbol (Python 2) - from typing import Dict single_input: int diff --git a/stdlib/2/sys.pyi b/stdlib/2/sys.pyi index bdfe7aaef..0136f3456 100644 --- a/stdlib/2/sys.pyi +++ b/stdlib/2/sys.pyi @@ -1,5 +1,3 @@ -"""Stubs for the 'sys' module.""" - from types import ClassType, FrameType, ModuleType, TracebackType from typing import IO, Any, BinaryIO, Callable, Dict, List, NoReturn, Optional, Sequence, Text, Tuple, Type, Union, overload diff --git a/stdlib/2/thread.pyi b/stdlib/2/thread.pyi index 2ffdf398e..b3ba062a4 100644 --- a/stdlib/2/thread.pyi +++ b/stdlib/2/thread.pyi @@ -1,4 +1,3 @@ -"""Stubs for the "thread" module.""" from typing import Any, Callable def _count() -> int: ... diff --git a/stdlib/2/toaiff.pyi b/stdlib/2/toaiff.pyi index f3e1b29d5..b70e026d6 100644 --- a/stdlib/2/toaiff.pyi +++ b/stdlib/2/toaiff.pyi @@ -1,6 +1,3 @@ -# Stubs for toaiff (Python 2) - -# Source: https://hg.python.org/cpython/file/2.7/Lib/toaiff.py from pipes import Template from typing import Dict, List diff --git a/stdlib/2/tokenize.pyi b/stdlib/2/tokenize.pyi index c77a81abe..86d5937d6 100644 --- a/stdlib/2/tokenize.pyi +++ b/stdlib/2/tokenize.pyi @@ -1,5 +1,3 @@ -# Automatically generated by pytype, manually fixed up. May still contain errors. - from typing import Any, Callable, Dict, Generator, Iterable, Iterator, List, Tuple, Union __author__: str diff --git a/stdlib/2/types.pyi b/stdlib/2/types.pyi index 1298f0c66..cf57c6329 100644 --- a/stdlib/2/types.pyi +++ b/stdlib/2/types.pyi @@ -1,10 +1,9 @@ -# Stubs for types -# Note, all classes "defined" here require special handling. - from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Type, TypeVar, Union, overload _T = TypeVar("_T") +# Note, all classes "defined" here require special handling. + class NoneType: ... TypeType = type diff --git a/stdlib/2/typing.pyi b/stdlib/2/typing.pyi index 28c1c16cc..ccec37a0c 100644 --- a/stdlib/2/typing.pyi +++ b/stdlib/2/typing.pyi @@ -1,5 +1,3 @@ -# Stubs for typing (Python 2.7) - import collections # Needed by aliases like DefaultDict, see mypy issue 2986 from abc import ABCMeta, abstractmethod from types import CodeType, FrameType, TracebackType diff --git a/stdlib/2/unittest.pyi b/stdlib/2/unittest.pyi index d70477838..57b73a762 100644 --- a/stdlib/2/unittest.pyi +++ b/stdlib/2/unittest.pyi @@ -1,7 +1,3 @@ -# Stubs for unittest - -# Based on http://docs.python.org/2.7/library/unittest.html - import datetime import types from abc import ABCMeta, abstractmethod diff --git a/stdlib/2/urlparse.pyi b/stdlib/2/urlparse.pyi index 6aba4ffae..40691239a 100644 --- a/stdlib/2/urlparse.pyi +++ b/stdlib/2/urlparse.pyi @@ -1,5 +1,3 @@ -# Stubs for urlparse (Python 2) - from typing import AnyStr, Dict, List, NamedTuple, Optional, Sequence, Tuple, Union, overload _String = Union[str, unicode] diff --git a/stdlib/2/user.pyi b/stdlib/2/user.pyi index 3a5bd1dd4..9c33922b3 100644 --- a/stdlib/2/user.pyi +++ b/stdlib/2/user.pyi @@ -1,7 +1,3 @@ -# Stubs for user (Python 2) - -# Docs: https://docs.python.org/2/library/user.html -# Source: https://hg.python.org/cpython/file/2.7/Lib/user.py from typing import Any def __getattr__(name) -> Any: ... diff --git a/stdlib/2/whichdb.pyi b/stdlib/2/whichdb.pyi index b1a69f481..67542096d 100644 --- a/stdlib/2/whichdb.pyi +++ b/stdlib/2/whichdb.pyi @@ -1,5 +1,3 @@ -# Source: https://hg.python.org/cpython/file/2.7/Lib/whichdb.py - from typing import Optional, Text def whichdb(filename: Text) -> Optional[str]: ... diff --git a/stdlib/2/xmlrpclib.pyi b/stdlib/2/xmlrpclib.pyi index c8e284eb0..52e36b61a 100644 --- a/stdlib/2/xmlrpclib.pyi +++ b/stdlib/2/xmlrpclib.pyi @@ -1,5 +1,3 @@ -# Stubs for xmlrpclib (Python 2) - from datetime import datetime from gzip import GzipFile from httplib import HTTPConnection, HTTPResponse, HTTPSConnection diff --git a/stdlib/2and3/_bisect.pyi b/stdlib/2and3/_bisect.pyi index 13b5dd5a4..1e909c2a7 100644 --- a/stdlib/2and3/_bisect.pyi +++ b/stdlib/2and3/_bisect.pyi @@ -1,5 +1,3 @@ -"""Stub file for the '_bisect' module.""" - from typing import MutableSequence, Optional, Sequence, TypeVar _T = TypeVar("_T") diff --git a/stdlib/2and3/_codecs.pyi b/stdlib/2and3/_codecs.pyi index 20f8bb998..2316cdbbc 100644 --- a/stdlib/2and3/_codecs.pyi +++ b/stdlib/2and3/_codecs.pyi @@ -1,5 +1,3 @@ -"""Stub file for the '_codecs' module.""" - import codecs import sys from typing import Any, Callable, Dict, Optional, Text, Tuple, Union diff --git a/stdlib/2and3/_heapq.pyi b/stdlib/2and3/_heapq.pyi index 44c15f0b9..673c03e80 100644 --- a/stdlib/2and3/_heapq.pyi +++ b/stdlib/2and3/_heapq.pyi @@ -1,5 +1,3 @@ -"""Stub file for the '_heapq' module.""" - import sys from typing import Any, Callable, Iterable, List, Optional, TypeVar diff --git a/stdlib/2and3/_random.pyi b/stdlib/2and3/_random.pyi index ec21c420e..aa0969342 100644 --- a/stdlib/2and3/_random.pyi +++ b/stdlib/2and3/_random.pyi @@ -1,5 +1,3 @@ -# Stubs for _random - import sys from typing import Tuple diff --git a/stdlib/2and3/array.pyi b/stdlib/2and3/array.pyi index 2fe01dc9a..c7e1ef0bb 100644 --- a/stdlib/2and3/array.pyi +++ b/stdlib/2and3/array.pyi @@ -1,7 +1,3 @@ -# Stubs for array - -# Based on http://docs.python.org/3.6/library/array.html - import sys from typing import Any, BinaryIO, Generic, Iterable, List, MutableSequence, Text, Tuple, TypeVar, Union, overload from typing_extensions import Literal diff --git a/stdlib/2and3/base64.pyi b/stdlib/2and3/base64.pyi index c1bac36c5..01be704aa 100644 --- a/stdlib/2and3/base64.pyi +++ b/stdlib/2and3/base64.pyi @@ -1,5 +1,3 @@ -# Stubs for base64 - import sys from typing import IO, Optional, Union diff --git a/stdlib/2and3/binascii.pyi b/stdlib/2and3/binascii.pyi index b915bc34c..d4141b9c4 100644 --- a/stdlib/2and3/binascii.pyi +++ b/stdlib/2and3/binascii.pyi @@ -1,7 +1,3 @@ -# Stubs for binascii - -# Based on http://docs.python.org/3.2/library/binascii.html - import sys from typing import Text, Union diff --git a/stdlib/2and3/bisect.pyi b/stdlib/2and3/bisect.pyi index 2f384befa..60dfc48d6 100644 --- a/stdlib/2and3/bisect.pyi +++ b/stdlib/2and3/bisect.pyi @@ -1,4 +1,3 @@ -# Stubs for bisect from _bisect import * bisect = bisect_right diff --git a/stdlib/2and3/chunk.pyi b/stdlib/2and3/chunk.pyi index 2337f00ca..50ff267c5 100644 --- a/stdlib/2and3/chunk.pyi +++ b/stdlib/2and3/chunk.pyi @@ -1,6 +1,3 @@ -# Source(py2): https://hg.python.org/cpython/file/2.7/Lib/chunk.py -# Source(py3): https://github.com/python/cpython/blob/master/Lib/chunk.py - from typing import IO class Chunk: diff --git a/stdlib/2and3/cmath.pyi b/stdlib/2and3/cmath.pyi index 212ede6a3..bb9e302ed 100644 --- a/stdlib/2and3/cmath.pyi +++ b/stdlib/2and3/cmath.pyi @@ -1,5 +1,3 @@ -"""Stub file for the 'cmath' module.""" - import sys from typing import SupportsComplex, SupportsFloat, Tuple, Union diff --git a/stdlib/2and3/cmd.pyi b/stdlib/2and3/cmd.pyi index e7d35af70..0b7a7f704 100644 --- a/stdlib/2and3/cmd.pyi +++ b/stdlib/2and3/cmd.pyi @@ -1,5 +1,3 @@ -# Stubs for cmd (Python 2/3) - from typing import IO, Any, Callable, List, Optional, Tuple class Cmd: diff --git a/stdlib/2and3/code.pyi b/stdlib/2and3/code.pyi index da5901901..16c2b129d 100644 --- a/stdlib/2and3/code.pyi +++ b/stdlib/2and3/code.pyi @@ -1,5 +1,3 @@ -# Stubs for code - import sys from types import CodeType from typing import Any, Callable, Mapping, Optional diff --git a/stdlib/2and3/codeop.pyi b/stdlib/2and3/codeop.pyi index 0e1129e67..f3d6c2819 100644 --- a/stdlib/2and3/codeop.pyi +++ b/stdlib/2and3/codeop.pyi @@ -1,6 +1,3 @@ -# Source(py2): https://hg.python.org/cpython/file/2.7/Lib/codeop.py -# Source(py3): https://github.com/python/cpython/blob/master/Lib/codeop.py - from types import CodeType from typing import Optional diff --git a/stdlib/2and3/colorsys.pyi b/stdlib/2and3/colorsys.pyi index c8b559187..8db2e2c9a 100644 --- a/stdlib/2and3/colorsys.pyi +++ b/stdlib/2and3/colorsys.pyi @@ -1,5 +1,3 @@ -# Stubs for colorsys - from typing import Tuple def rgb_to_yiq(r: float, g: float, b: float) -> Tuple[float, float, float]: ... diff --git a/stdlib/2and3/copy.pyi b/stdlib/2and3/copy.pyi index 895871156..ea00078ed 100644 --- a/stdlib/2and3/copy.pyi +++ b/stdlib/2and3/copy.pyi @@ -1,5 +1,3 @@ -# Stubs for copy - from typing import Any, Dict, Optional, TypeVar _T = TypeVar("_T") diff --git a/stdlib/2and3/ctypes/__init__.pyi b/stdlib/2and3/ctypes/__init__.pyi index 8ccc47c0b..3a9b096c6 100644 --- a/stdlib/2and3/ctypes/__init__.pyi +++ b/stdlib/2and3/ctypes/__init__.pyi @@ -1,5 +1,3 @@ -# Stubs for ctypes - import sys from array import array from typing import ( diff --git a/stdlib/2and3/ctypes/util.pyi b/stdlib/2and3/ctypes/util.pyi index 3e95efc93..20914c70a 100644 --- a/stdlib/2and3/ctypes/util.pyi +++ b/stdlib/2and3/ctypes/util.pyi @@ -1,5 +1,3 @@ -# Stubs for ctypes.util - import sys from typing import Optional diff --git a/stdlib/2and3/difflib.pyi b/stdlib/2and3/difflib.pyi index af460079b..572972ccd 100644 --- a/stdlib/2and3/difflib.pyi +++ b/stdlib/2and3/difflib.pyi @@ -1,5 +1,3 @@ -# Based on https://docs.python.org/2.7/library/difflib.html and https://docs.python.org/3.2/library/difflib.html - import sys from typing import ( Any, diff --git a/stdlib/2and3/errno.pyi b/stdlib/2and3/errno.pyi index 26f4b089e..b053604fc 100644 --- a/stdlib/2and3/errno.pyi +++ b/stdlib/2and3/errno.pyi @@ -1,5 +1,3 @@ -# Stubs for errno - from typing import Mapping errorcode: Mapping[int, str] diff --git a/stdlib/2and3/filecmp.pyi b/stdlib/2and3/filecmp.pyi index adbe956e1..b05eebac0 100644 --- a/stdlib/2and3/filecmp.pyi +++ b/stdlib/2and3/filecmp.pyi @@ -1,4 +1,3 @@ -# Stubs for filecmp (Python 2/3) import sys from typing import Any, AnyStr, Callable, Dict, Generic, Iterable, List, Optional, Sequence, Text, Tuple, Union diff --git a/stdlib/2and3/formatter.pyi b/stdlib/2and3/formatter.pyi index 0c8c51c4c..31c45592a 100644 --- a/stdlib/2and3/formatter.pyi +++ b/stdlib/2and3/formatter.pyi @@ -1,5 +1,3 @@ -# Source: https://hg.python.org/cpython/file/2.7/Lib/formatter.py -# and https://github.com/python/cpython/blob/master/Lib/formatter.py from typing import IO, Any, Iterable, List, Optional, Tuple AS_IS: None diff --git a/stdlib/2and3/fractions.pyi b/stdlib/2and3/fractions.pyi index 771868e0a..dd9c77ed3 100644 --- a/stdlib/2and3/fractions.pyi +++ b/stdlib/2and3/fractions.pyi @@ -1,9 +1,3 @@ -# Stubs for fractions -# See https://docs.python.org/3/library/fractions.html -# -# Note: these stubs are incomplete. The more complex type -# signatures are currently omitted. Also see numbers.pyi. - import sys from decimal import Decimal from numbers import Integral, Rational, Real diff --git a/stdlib/2and3/hmac.pyi b/stdlib/2and3/hmac.pyi index 5b2b705e4..ca4013da7 100644 --- a/stdlib/2and3/hmac.pyi +++ b/stdlib/2and3/hmac.pyi @@ -1,5 +1,3 @@ -# Stubs for hmac - import sys from _typeshed import ReadableBuffer from types import ModuleType diff --git a/stdlib/2and3/lib2to3/__init__.pyi b/stdlib/2and3/lib2to3/__init__.pyi index 145e31b1d..e69de29bb 100644 --- a/stdlib/2and3/lib2to3/__init__.pyi +++ b/stdlib/2and3/lib2to3/__init__.pyi @@ -1 +0,0 @@ -# Stubs for lib2to3 (Python 3.6) diff --git a/stdlib/2and3/lib2to3/pgen2/literals.pyi b/stdlib/2and3/lib2to3/pgen2/literals.pyi index 3166ffbf3..160d6fd76 100644 --- a/stdlib/2and3/lib2to3/pgen2/literals.pyi +++ b/stdlib/2and3/lib2to3/pgen2/literals.pyi @@ -1,5 +1,3 @@ -# Stubs for lib2to3.pgen2.literals (Python 3.6) - from typing import Dict, Match, Text simple_escapes: Dict[Text, Text] diff --git a/stdlib/2and3/lib2to3/pgen2/parse.pyi b/stdlib/2and3/lib2to3/pgen2/parse.pyi index a2e433c75..b7018cba9 100644 --- a/stdlib/2and3/lib2to3/pgen2/parse.pyi +++ b/stdlib/2and3/lib2to3/pgen2/parse.pyi @@ -1,5 +1,3 @@ -# Stubs for lib2to3.pgen2.parse (Python 3.6) - from lib2to3.pgen2.grammar import _DFAS, Grammar from lib2to3.pytree import _NL, _Convert, _RawNode from typing import Any, List, Optional, Sequence, Set, Text, Tuple diff --git a/stdlib/2and3/lib2to3/pgen2/token.pyi b/stdlib/2and3/lib2to3/pgen2/token.pyi index c256af8f2..19660cb0c 100644 --- a/stdlib/2and3/lib2to3/pgen2/token.pyi +++ b/stdlib/2and3/lib2to3/pgen2/token.pyi @@ -1,5 +1,3 @@ -# Stubs for lib2to3.pgen2.token (Python 3.6) - import sys from typing import Dict, Text diff --git a/stdlib/2and3/lib2to3/pgen2/tokenize.pyi b/stdlib/2and3/lib2to3/pgen2/tokenize.pyi index 0b5d65748..477341c1a 100644 --- a/stdlib/2and3/lib2to3/pgen2/tokenize.pyi +++ b/stdlib/2and3/lib2to3/pgen2/tokenize.pyi @@ -1,6 +1,3 @@ -# Stubs for lib2to3.pgen2.tokenize (Python 3.6) -# NOTE: Only elements from __all__ are present. - from lib2to3.pgen2.token import * # noqa from typing import Callable, Iterable, Iterator, List, Text, Tuple diff --git a/stdlib/2and3/lib2to3/pygram.pyi b/stdlib/2and3/lib2to3/pygram.pyi index 680c73d82..bf96a55c4 100644 --- a/stdlib/2and3/lib2to3/pygram.pyi +++ b/stdlib/2and3/lib2to3/pygram.pyi @@ -1,5 +1,3 @@ -# Stubs for lib2to3.pygram (Python 3.6) - from lib2to3.pgen2.grammar import Grammar class Symbols: diff --git a/stdlib/2and3/lib2to3/pytree.pyi b/stdlib/2and3/lib2to3/pytree.pyi index 8ed6cd9bb..955763588 100644 --- a/stdlib/2and3/lib2to3/pytree.pyi +++ b/stdlib/2and3/lib2to3/pytree.pyi @@ -1,5 +1,3 @@ -# Stubs for lib2to3.pytree (Python 3.6) - import sys from lib2to3.pgen2.grammar import Grammar from typing import Any, Callable, Dict, Iterator, List, Optional, Text, Tuple, TypeVar, Union diff --git a/stdlib/2and3/locale.pyi b/stdlib/2and3/locale.pyi index d56ace284..c5e25c95a 100644 --- a/stdlib/2and3/locale.pyi +++ b/stdlib/2and3/locale.pyi @@ -1,5 +1,3 @@ -# Stubs for locale - import sys from decimal import Decimal from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union diff --git a/stdlib/2and3/macpath.pyi b/stdlib/2and3/macpath.pyi index 550c9542c..0b5ccbf05 100644 --- a/stdlib/2and3/macpath.pyi +++ b/stdlib/2and3/macpath.pyi @@ -1,6 +1,3 @@ -# Stubs for os.path -# Ron Murawski - import os import sys from _typeshed import AnyPath, BytesPath, StrPath diff --git a/stdlib/2and3/math.pyi b/stdlib/2and3/math.pyi index 8f438bc72..562ea6131 100644 --- a/stdlib/2and3/math.pyi +++ b/stdlib/2and3/math.pyi @@ -1,6 +1,3 @@ -# Stubs for math -# See: http://docs.python.org/2/library/math.html - import sys from typing import Iterable, SupportsFloat, SupportsInt, Tuple, overload diff --git a/stdlib/2and3/mimetypes.pyi b/stdlib/2and3/mimetypes.pyi index 9e5ba6dfd..43f27dda4 100644 --- a/stdlib/2and3/mimetypes.pyi +++ b/stdlib/2and3/mimetypes.pyi @@ -1,5 +1,3 @@ -# Stubs for mimetypes - import sys from typing import IO, Dict, List, Optional, Sequence, Text, Tuple, Union diff --git a/stdlib/2and3/ntpath.pyi b/stdlib/2and3/ntpath.pyi index 2fe03bb1b..207c0be78 100644 --- a/stdlib/2and3/ntpath.pyi +++ b/stdlib/2and3/ntpath.pyi @@ -1,4 +1,3 @@ -# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent! import os import sys from _typeshed import AnyPath, BytesPath, StrPath diff --git a/stdlib/2and3/numbers.pyi b/stdlib/2and3/numbers.pyi index 6a2290048..4f8a5a5d6 100644 --- a/stdlib/2and3/numbers.pyi +++ b/stdlib/2and3/numbers.pyi @@ -1,7 +1,3 @@ -# Stubs for numbers (Python 3.5) -# See https://docs.python.org/2.7/library/numbers.html -# and https://docs.python.org/3/library/numbers.html -# # Note: these stubs are incomplete. The more complex type # signatures are currently omitted. diff --git a/stdlib/2and3/operator.pyi b/stdlib/2and3/operator.pyi index 27d532da9..f82d4c667 100644 --- a/stdlib/2and3/operator.pyi +++ b/stdlib/2and3/operator.pyi @@ -1,5 +1,3 @@ -# Stubs for operator - import sys from typing import ( Any, diff --git a/stdlib/2and3/optparse.pyi b/stdlib/2and3/optparse.pyi index 27dd5c6cb..76f7be471 100644 --- a/stdlib/2and3/optparse.pyi +++ b/stdlib/2and3/optparse.pyi @@ -1,4 +1,3 @@ -# Generated by pytype, with only minor tweaks. Might be incomplete. import sys from typing import IO, Any, AnyStr, Callable, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Type, Union, overload diff --git a/stdlib/2and3/pickletools.pyi b/stdlib/2and3/pickletools.pyi index 1c938eda5..ec279524b 100644 --- a/stdlib/2and3/pickletools.pyi +++ b/stdlib/2and3/pickletools.pyi @@ -1,4 +1,3 @@ -# Stubs for pickletools (Python 2 and 3) import sys from typing import IO, Any, Callable, Iterator, List, MutableMapping, Optional, Text, Tuple, Type, Union diff --git a/stdlib/2and3/poplib.pyi b/stdlib/2and3/poplib.pyi index 2cf628533..2c08f3586 100644 --- a/stdlib/2and3/poplib.pyi +++ b/stdlib/2and3/poplib.pyi @@ -1,5 +1,3 @@ -# Stubs for poplib (Python 2 and 3) - import socket import ssl import sys diff --git a/stdlib/2and3/posixpath.pyi b/stdlib/2and3/posixpath.pyi index 2fe03bb1b..207c0be78 100644 --- a/stdlib/2and3/posixpath.pyi +++ b/stdlib/2and3/posixpath.pyi @@ -1,4 +1,3 @@ -# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent! import os import sys from _typeshed import AnyPath, BytesPath, StrPath diff --git a/stdlib/2and3/pprint.pyi b/stdlib/2and3/pprint.pyi index 5af303d37..6c1133aa5 100644 --- a/stdlib/2and3/pprint.pyi +++ b/stdlib/2and3/pprint.pyi @@ -1,8 +1,3 @@ -# Stubs for pprint - -# Based on http://docs.python.org/2/library/pprint.html -# Based on http://docs.python.org/3/library/pprint.html - import sys from typing import IO, Any, Dict, Optional, Tuple diff --git a/stdlib/2and3/pty.pyi b/stdlib/2and3/pty.pyi index 7be053aef..f31e2c61c 100644 --- a/stdlib/2and3/pty.pyi +++ b/stdlib/2and3/pty.pyi @@ -1,4 +1,3 @@ -# Stubs for pty (Python 2 and 3) import sys from typing import Callable, Iterable, Tuple, Union diff --git a/stdlib/2and3/py_compile.pyi b/stdlib/2and3/py_compile.pyi index 7f218737d..7f6815b33 100644 --- a/stdlib/2and3/py_compile.pyi +++ b/stdlib/2and3/py_compile.pyi @@ -1,4 +1,3 @@ -# Stubs for py_compile (Python 2 and 3) import enum import sys from typing import AnyStr, List, Optional, Text, Type, Union diff --git a/stdlib/2and3/quopri.pyi b/stdlib/2and3/quopri.pyi index 2823f8c40..c2ffabe7d 100644 --- a/stdlib/2and3/quopri.pyi +++ b/stdlib/2and3/quopri.pyi @@ -1,5 +1,3 @@ -# Stubs for quopri (Python 2 and 3) - from typing import BinaryIO def encode(input: BinaryIO, output: BinaryIO, quotetabs: int, header: int = ...) -> None: ... diff --git a/stdlib/2and3/readline.pyi b/stdlib/2and3/readline.pyi index c2e1e21d8..9b8e05f09 100644 --- a/stdlib/2and3/readline.pyi +++ b/stdlib/2and3/readline.pyi @@ -1,5 +1,3 @@ -# Stubs for readline - import sys from typing import Callable, Optional, Sequence diff --git a/stdlib/2and3/rlcompleter.pyi b/stdlib/2and3/rlcompleter.pyi index 9d48a086d..3733cc131 100644 --- a/stdlib/2and3/rlcompleter.pyi +++ b/stdlib/2and3/rlcompleter.pyi @@ -1,5 +1,3 @@ -# Stubs for rlcompleter - import sys from typing import Any, Dict, Optional, Union diff --git a/stdlib/2and3/site.pyi b/stdlib/2and3/site.pyi index 65a57834d..e91176ac4 100644 --- a/stdlib/2and3/site.pyi +++ b/stdlib/2and3/site.pyi @@ -1,5 +1,3 @@ -# Stubs for site - import sys from typing import Iterable, List, Optional diff --git a/stdlib/2and3/smtpd.pyi b/stdlib/2and3/smtpd.pyi index d7b1c8dde..051fe72ea 100644 --- a/stdlib/2and3/smtpd.pyi +++ b/stdlib/2and3/smtpd.pyi @@ -1,4 +1,3 @@ -# Stubs for smtpd (Python 2 and 3) import asynchat import asyncore import socket diff --git a/stdlib/2and3/socket.pyi b/stdlib/2and3/socket.pyi index e4c36dca2..e345c7428 100644 --- a/stdlib/2and3/socket.pyi +++ b/stdlib/2and3/socket.pyi @@ -1,19 +1,3 @@ -"""Stub for the socket module - -This file is organized to mirror the module's documentation, with a very small -number of exceptions. - -To avoid requiring tests on all platforms, platform checks are included only -where the documentation notes platform availability (as opposed to following -actual availability), with one or two exceptions. - -Module documentation: https://docs.python.org/3/library/socket.html -CPython module source: https://github.com/python/cpython/blob/master/Lib/socket.py -CPython C source: https://github.com/python/cpython/blob/master/Modules/socketmodule.c -""" -# Authorship from original mypy stubs (not in typeshed git history): -# Ron Murawski -# adapted for Python 2.7 by Michal Pokorny import sys from typing import Any, BinaryIO, Iterable, List, Optional, Sequence, Text, TextIO, Tuple, TypeVar, Union, overload from typing_extensions import Literal diff --git a/stdlib/2and3/sqlite3/dbapi2.pyi b/stdlib/2and3/sqlite3/dbapi2.pyi index 088caea35..ae3b01bfb 100644 --- a/stdlib/2and3/sqlite3/dbapi2.pyi +++ b/stdlib/2and3/sqlite3/dbapi2.pyi @@ -1,6 +1,3 @@ -# Filip Hron -# based heavily on Andrey Vlasovskikh's python-skeletons https://github.com/JetBrains/python-skeletons/blob/master/sqlite3.py - import os import sys from datetime import date, datetime, time diff --git a/stdlib/2and3/sre_compile.pyi b/stdlib/2and3/sre_compile.pyi index 708fa603c..9b50b75d8 100644 --- a/stdlib/2and3/sre_compile.pyi +++ b/stdlib/2and3/sre_compile.pyi @@ -1,6 +1,3 @@ -# Source: https://hg.python.org/cpython/file/2.7/Lib/sre_compile.py -# and https://github.com/python/cpython/blob/master/Lib/sre_compile.py - import sys from sre_constants import ( SRE_FLAG_DEBUG as SRE_FLAG_DEBUG, diff --git a/stdlib/2and3/stringprep.pyi b/stdlib/2and3/stringprep.pyi index e3b7e9dc2..604fd2f2c 100644 --- a/stdlib/2and3/stringprep.pyi +++ b/stdlib/2and3/stringprep.pyi @@ -1,5 +1,3 @@ -# Stubs for stringprep (Python 2 and 3) - from typing import Text def in_table_a1(code: Text) -> bool: ... diff --git a/stdlib/2and3/struct.pyi b/stdlib/2and3/struct.pyi index b223899f4..9edf6842b 100644 --- a/stdlib/2and3/struct.pyi +++ b/stdlib/2and3/struct.pyi @@ -1,8 +1,3 @@ -# Stubs for struct - -# Based on http://docs.python.org/3.2/library/struct.html -# Based on http://docs.python.org/2/library/struct.html - import sys from array import array from mmap import mmap diff --git a/stdlib/2and3/sunau.pyi b/stdlib/2and3/sunau.pyi index c4183ed3c..b9475937c 100644 --- a/stdlib/2and3/sunau.pyi +++ b/stdlib/2and3/sunau.pyi @@ -1,5 +1,3 @@ -# Stubs for sunau (Python 2 and 3) - import sys from typing import IO, Any, NamedTuple, NoReturn, Optional, Text, Tuple, Union diff --git a/stdlib/2and3/telnetlib.pyi b/stdlib/2and3/telnetlib.pyi index c6df711c3..a8e37f64f 100644 --- a/stdlib/2and3/telnetlib.pyi +++ b/stdlib/2and3/telnetlib.pyi @@ -1,5 +1,3 @@ -# Stubs for telnetlib (Python 2 and 3) - import socket import sys from typing import Any, Callable, Match, Optional, Pattern, Sequence, Tuple, Union diff --git a/stdlib/2and3/time.pyi b/stdlib/2and3/time.pyi index efaf33d15..e33157335 100644 --- a/stdlib/2and3/time.pyi +++ b/stdlib/2and3/time.pyi @@ -1,6 +1,3 @@ -"""Stub file for the 'time' module.""" -# See https://docs.python.org/3/library/time.html - import sys from typing import Any, NamedTuple, Optional, Tuple, Union diff --git a/stdlib/2and3/timeit.pyi b/stdlib/2and3/timeit.pyi index 941a97a37..336dd5c69 100644 --- a/stdlib/2and3/timeit.pyi +++ b/stdlib/2and3/timeit.pyi @@ -1,5 +1,3 @@ -# Stubs for timeit (Python 2 and 3) - import sys from typing import IO, Any, Callable, Dict, List, Optional, Sequence, Text, Tuple, Union diff --git a/stdlib/2and3/tty.pyi b/stdlib/2and3/tty.pyi index 2bce1eca7..c0dc418e9 100644 --- a/stdlib/2and3/tty.pyi +++ b/stdlib/2and3/tty.pyi @@ -1,5 +1,3 @@ -# Stubs for tty (Python 3.6) - from typing import IO, Union _FD = Union[int, IO[str]] diff --git a/stdlib/2and3/uu.pyi b/stdlib/2and3/uu.pyi index 4dae13cfe..2bb2c2a1c 100644 --- a/stdlib/2and3/uu.pyi +++ b/stdlib/2and3/uu.pyi @@ -1,4 +1,3 @@ -# Stubs for uu (Python 2 and 3) import sys from typing import BinaryIO, Optional, Text, Union diff --git a/stdlib/2and3/uuid.pyi b/stdlib/2and3/uuid.pyi index 6d724902f..68b235162 100644 --- a/stdlib/2and3/uuid.pyi +++ b/stdlib/2and3/uuid.pyi @@ -1,5 +1,3 @@ -# Stubs for uuid - import sys from typing import Any, Optional, Text, Tuple diff --git a/stdlib/2and3/wave.pyi b/stdlib/2and3/wave.pyi index 94c347424..c89ba628e 100644 --- a/stdlib/2and3/wave.pyi +++ b/stdlib/2and3/wave.pyi @@ -1,5 +1,3 @@ -# Stubs for wave (Python 2 and 3) - import sys from typing import IO, Any, BinaryIO, NamedTuple, NoReturn, Optional, Text, Tuple, Union diff --git a/stdlib/2and3/xdrlib.pyi b/stdlib/2and3/xdrlib.pyi index 75d5fc7d8..378504c37 100644 --- a/stdlib/2and3/xdrlib.pyi +++ b/stdlib/2and3/xdrlib.pyi @@ -1,4 +1,3 @@ -# Structs for xdrlib (Python 2 and 3) from typing import Callable, List, Sequence, TypeVar _T = TypeVar("_T") diff --git a/stdlib/2and3/xml/etree/ElementPath.pyi b/stdlib/2and3/xml/etree/ElementPath.pyi index 61f3ea6d0..0f269b4e8 100644 --- a/stdlib/2and3/xml/etree/ElementPath.pyi +++ b/stdlib/2and3/xml/etree/ElementPath.pyi @@ -1,5 +1,3 @@ -# Stubs for xml.etree.ElementPath (Python 3.4) - from typing import Callable, Dict, Generator, List, Optional, Pattern, Tuple, TypeVar, Union from xml.etree.ElementTree import Element diff --git a/stdlib/2and3/xml/etree/cElementTree.pyi b/stdlib/2and3/xml/etree/cElementTree.pyi index c384968d0..c41e2bee0 100644 --- a/stdlib/2and3/xml/etree/cElementTree.pyi +++ b/stdlib/2and3/xml/etree/cElementTree.pyi @@ -1,3 +1 @@ -# Stubs for xml.etree.cElementTree (Python 3.4) - from xml.etree.ElementTree import * # noqa: F403 diff --git a/stdlib/2and3/zipimport.pyi b/stdlib/2and3/zipimport.pyi index 3344df913..0d1a33094 100644 --- a/stdlib/2and3/zipimport.pyi +++ b/stdlib/2and3/zipimport.pyi @@ -1,5 +1,3 @@ -"""Stub file for the 'zipimport' module.""" - import os import sys from types import CodeType, ModuleType diff --git a/stdlib/2and3/zlib.pyi b/stdlib/2and3/zlib.pyi index 3f1449ffe..367578467 100644 --- a/stdlib/2and3/zlib.pyi +++ b/stdlib/2and3/zlib.pyi @@ -1,4 +1,3 @@ -# Stubs for zlib import sys from array import array from typing import Any, Union diff --git a/stdlib/3.6/secrets.pyi b/stdlib/3.6/secrets.pyi index b8afd43a3..84b2fea83 100644 --- a/stdlib/3.6/secrets.pyi +++ b/stdlib/3.6/secrets.pyi @@ -1,5 +1,3 @@ -# Stubs for secrets (Python 3.6) - from hmac import compare_digest as compare_digest from random import SystemRandom as SystemRandom from typing import Optional, Sequence, TypeVar diff --git a/stdlib/3/_imp.pyi b/stdlib/3/_imp.pyi index a9bf14f7c..bfc4d42cd 100644 --- a/stdlib/3/_imp.pyi +++ b/stdlib/3/_imp.pyi @@ -1,5 +1,3 @@ -# Stubs for _imp (Python 3.6) - import types from importlib.machinery import ModuleSpec from typing import Any, List diff --git a/stdlib/3/_json.pyi b/stdlib/3/_json.pyi index b0e06e623..af2b024af 100644 --- a/stdlib/3/_json.pyi +++ b/stdlib/3/_json.pyi @@ -1,5 +1,3 @@ -"""Stub file for the '_json' module.""" - from typing import Any, Callable, Dict, Optional, Tuple class make_encoder: diff --git a/stdlib/3/_operator.pyi b/stdlib/3/_operator.pyi index dffa87fb6..bea438861 100644 --- a/stdlib/3/_operator.pyi +++ b/stdlib/3/_operator.pyi @@ -1,5 +1,3 @@ -# Stubs for _operator (Python 3.5) - # In reality the import is the other way around, but this way we can keep the operator stub in 2and3 from operator import ( abs as abs, diff --git a/stdlib/3/_posixsubprocess.pyi b/stdlib/3/_posixsubprocess.pyi index 3ff76b517..05209ba05 100644 --- a/stdlib/3/_posixsubprocess.pyi +++ b/stdlib/3/_posixsubprocess.pyi @@ -1,5 +1,3 @@ -# Stubs for _posixsubprocess - # NOTE: These are incomplete! from typing import Callable, Sequence, Tuple diff --git a/stdlib/3/_stat.pyi b/stdlib/3/_stat.pyi index 72d3f6879..634f7da02 100644 --- a/stdlib/3/_stat.pyi +++ b/stdlib/3/_stat.pyi @@ -1,5 +1,3 @@ -"""Stub file for the '_stat' module.""" - SF_APPEND: int SF_ARCHIVED: int SF_IMMUTABLE: int diff --git a/stdlib/3/_threading_local.pyi b/stdlib/3/_threading_local.pyi index 426496b11..ed6eb8d95 100644 --- a/stdlib/3/_threading_local.pyi +++ b/stdlib/3/_threading_local.pyi @@ -1,4 +1,3 @@ -# Source: https://github.com/python/cpython/blob/master/Lib/_threading_local.py from typing import Any, Dict, Tuple from weakref import ReferenceType diff --git a/stdlib/3/abc.pyi b/stdlib/3/abc.pyi index 81e6b0ace..6be75c3bc 100644 --- a/stdlib/3/abc.pyi +++ b/stdlib/3/abc.pyi @@ -1,11 +1,9 @@ from typing import Any, Callable, Type, TypeVar -# Stubs for abc. - _T = TypeVar("_T") _FuncT = TypeVar("_FuncT", bound=Callable[..., Any]) -# Thesee definitions have special processing in mypy +# These definitions have special processing in mypy class ABCMeta(type): def register(cls: ABCMeta, subclass: Type[_T]) -> Type[_T]: ... diff --git a/stdlib/3/atexit.pyi b/stdlib/3/atexit.pyi index 24f93899d..f068a3ded 100644 --- a/stdlib/3/atexit.pyi +++ b/stdlib/3/atexit.pyi @@ -1,5 +1,3 @@ -"""Stub file for the 'atexit' module.""" - from typing import Any, Callable def _clear() -> None: ... diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 0e91a9ccb..0ec3d675e 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -1,6 +1,3 @@ -# True and False are deliberately omitted because they are keywords in -# Python 3, and stub files conform to Python 3 syntax. - import sys from _typeshed import ( AnyPath, diff --git a/stdlib/3/collections/abc.pyi b/stdlib/3/collections/abc.pyi index 2873cd3d1..f1df1961c 100644 --- a/stdlib/3/collections/abc.pyi +++ b/stdlib/3/collections/abc.pyi @@ -1,6 +1,3 @@ -# Stubs for collections.abc (introduced from Python 3.3) -# -# https://docs.python.org/3.3/whatsnew/3.3.html#collections import sys from . import ( diff --git a/stdlib/3/distutils/archive_util.pyi b/stdlib/3/distutils/archive_util.pyi index 533130f3f..0e94d3818 100644 --- a/stdlib/3/distutils/archive_util.pyi +++ b/stdlib/3/distutils/archive_util.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.archive_util - from typing import Optional def make_archive( diff --git a/stdlib/3/distutils/bcppcompiler.pyi b/stdlib/3/distutils/bcppcompiler.pyi index dec317f81..3e432f94b 100644 --- a/stdlib/3/distutils/bcppcompiler.pyi +++ b/stdlib/3/distutils/bcppcompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.bcppcompiler - from distutils.ccompiler import CCompiler class BCPPCompiler(CCompiler): ... diff --git a/stdlib/3/distutils/ccompiler.pyi b/stdlib/3/distutils/ccompiler.pyi index 671e0ae23..831311d2c 100644 --- a/stdlib/3/distutils/ccompiler.pyi +++ b/stdlib/3/distutils/ccompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.ccompiler - from typing import Any, Callable, List, Optional, Tuple, Union _Macro = Union[Tuple[str], Tuple[str, Optional[str]]] diff --git a/stdlib/3/distutils/core.pyi b/stdlib/3/distutils/core.pyi index 147a29608..9a3fa70fd 100644 --- a/stdlib/3/distutils/core.pyi +++ b/stdlib/3/distutils/core.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.core - from distutils.cmd import Command as Command from distutils.dist import Distribution as Distribution from distutils.extension import Extension as Extension diff --git a/stdlib/3/distutils/cygwinccompiler.pyi b/stdlib/3/distutils/cygwinccompiler.pyi index bf36fc70c..1f85b2548 100644 --- a/stdlib/3/distutils/cygwinccompiler.pyi +++ b/stdlib/3/distutils/cygwinccompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.cygwinccompiler - from distutils.unixccompiler import UnixCCompiler class CygwinCCompiler(UnixCCompiler): ... diff --git a/stdlib/3/distutils/debug.pyi b/stdlib/3/distutils/debug.pyi index 76de44772..098dc3dee 100644 --- a/stdlib/3/distutils/debug.pyi +++ b/stdlib/3/distutils/debug.pyi @@ -1,3 +1 @@ -# Stubs for distutils.debug - DEBUG: bool diff --git a/stdlib/3/distutils/dep_util.pyi b/stdlib/3/distutils/dep_util.pyi index 64d1ee748..6f779d540 100644 --- a/stdlib/3/distutils/dep_util.pyi +++ b/stdlib/3/distutils/dep_util.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.dep_util - from typing import List, Tuple def newer(source: str, target: str) -> bool: ... diff --git a/stdlib/3/distutils/dir_util.pyi b/stdlib/3/distutils/dir_util.pyi index 03db4fd7b..4c4a22102 100644 --- a/stdlib/3/distutils/dir_util.pyi +++ b/stdlib/3/distutils/dir_util.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.dir_util - from typing import List def mkpath(name: str, mode: int = ..., verbose: int = ..., dry_run: int = ...) -> List[str]: ... diff --git a/stdlib/3/distutils/dist.pyi b/stdlib/3/distutils/dist.pyi index ca1ab3d58..62edb4b56 100644 --- a/stdlib/3/distutils/dist.pyi +++ b/stdlib/3/distutils/dist.pyi @@ -1,4 +1,3 @@ -# Stubs for distutils.dist from distutils.cmd import Command from typing import Any, Dict, Iterable, Mapping, Optional, Tuple, Type diff --git a/stdlib/3/distutils/fancy_getopt.pyi b/stdlib/3/distutils/fancy_getopt.pyi index 02e4f93a1..8eb4c416f 100644 --- a/stdlib/3/distutils/fancy_getopt.pyi +++ b/stdlib/3/distutils/fancy_getopt.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.fancy_getopt - from typing import Any, List, Mapping, Optional, Tuple, Union, overload _Option = Tuple[str, Optional[str], str] diff --git a/stdlib/3/distutils/file_util.pyi b/stdlib/3/distutils/file_util.pyi index 37c5f59a0..018339733 100644 --- a/stdlib/3/distutils/file_util.pyi +++ b/stdlib/3/distutils/file_util.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.file_util - from typing import Optional, Sequence, Tuple def copy_file( diff --git a/stdlib/3/distutils/filelist.pyi b/stdlib/3/distutils/filelist.pyi index 4ecaebaf7..8fa55d09d 100644 --- a/stdlib/3/distutils/filelist.pyi +++ b/stdlib/3/distutils/filelist.pyi @@ -1,3 +1 @@ -# Stubs for distutils.filelist - class FileList: ... diff --git a/stdlib/3/distutils/msvccompiler.pyi b/stdlib/3/distutils/msvccompiler.pyi index 9c588ebfc..80872a6b7 100644 --- a/stdlib/3/distutils/msvccompiler.pyi +++ b/stdlib/3/distutils/msvccompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.msvccompiler - from distutils.ccompiler import CCompiler class MSVCCompiler(CCompiler): ... diff --git a/stdlib/3/distutils/spawn.pyi b/stdlib/3/distutils/spawn.pyi index 924a74e46..e12eae99b 100644 --- a/stdlib/3/distutils/spawn.pyi +++ b/stdlib/3/distutils/spawn.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.spawn - from typing import List, Optional def spawn(cmd: List[str], search_path: bool = ..., verbose: bool = ..., dry_run: bool = ...) -> None: ... diff --git a/stdlib/3/distutils/sysconfig.pyi b/stdlib/3/distutils/sysconfig.pyi index fe2f43c35..9061db75c 100644 --- a/stdlib/3/distutils/sysconfig.pyi +++ b/stdlib/3/distutils/sysconfig.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.sysconfig - from distutils.ccompiler import CCompiler from typing import Mapping, Optional, Union diff --git a/stdlib/3/distutils/text_file.pyi b/stdlib/3/distutils/text_file.pyi index 13272cf10..9872a1f25 100644 --- a/stdlib/3/distutils/text_file.pyi +++ b/stdlib/3/distutils/text_file.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.text_file - from typing import IO, List, Optional, Tuple, Union class TextFile: diff --git a/stdlib/3/distutils/unixccompiler.pyi b/stdlib/3/distutils/unixccompiler.pyi index b7a36ad51..e1d443471 100644 --- a/stdlib/3/distutils/unixccompiler.pyi +++ b/stdlib/3/distutils/unixccompiler.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.unixccompiler - from distutils.ccompiler import CCompiler class UnixCCompiler(CCompiler): ... diff --git a/stdlib/3/distutils/util.pyi b/stdlib/3/distutils/util.pyi index 9998ede98..0086d726a 100644 --- a/stdlib/3/distutils/util.pyi +++ b/stdlib/3/distutils/util.pyi @@ -1,5 +1,3 @@ -# Stubs for distutils.util - from typing import Any, Callable, List, Mapping, Optional, Tuple def get_platform() -> str: ... diff --git a/stdlib/3/email/__init__.pyi b/stdlib/3/email/__init__.pyi index 804a23c66..e2c22554a 100644 --- a/stdlib/3/email/__init__.pyi +++ b/stdlib/3/email/__init__.pyi @@ -1,5 +1,3 @@ -# Stubs for email (Python 3.4) - from email.message import Message from email.policy import Policy from typing import IO, Callable diff --git a/stdlib/3/email/charset.pyi b/stdlib/3/email/charset.pyi index 7399d076e..7c8e8ae71 100644 --- a/stdlib/3/email/charset.pyi +++ b/stdlib/3/email/charset.pyi @@ -1,5 +1,3 @@ -# Stubs for email.charset (Python 3.4) - from typing import Any, Iterator, List, Optional QP: int # undocumented diff --git a/stdlib/3/email/contentmanager.pyi b/stdlib/3/email/contentmanager.pyi index e61399ef6..68fe99c8c 100644 --- a/stdlib/3/email/contentmanager.pyi +++ b/stdlib/3/email/contentmanager.pyi @@ -1,5 +1,3 @@ -# Stubs for email.contentmanager (Python 3.4) - from email.message import Message from typing import Any, Callable diff --git a/stdlib/3/email/encoders.pyi b/stdlib/3/email/encoders.pyi index bb5c84cb1..e05225e89 100644 --- a/stdlib/3/email/encoders.pyi +++ b/stdlib/3/email/encoders.pyi @@ -1,5 +1,3 @@ -# Stubs for email.encoders (Python 3.4) - from email.message import Message def encode_base64(msg: Message) -> None: ... diff --git a/stdlib/3/email/errors.pyi b/stdlib/3/email/errors.pyi index 2804e7e2d..dd2b70b10 100644 --- a/stdlib/3/email/errors.pyi +++ b/stdlib/3/email/errors.pyi @@ -1,5 +1,3 @@ -# Stubs for email.errors (Python 3.4) - class MessageError(Exception): ... class MessageParseError(MessageError): ... class HeaderParseError(MessageParseError): ... diff --git a/stdlib/3/email/generator.pyi b/stdlib/3/email/generator.pyi index 12cba262f..ff0c2d902 100644 --- a/stdlib/3/email/generator.pyi +++ b/stdlib/3/email/generator.pyi @@ -1,5 +1,3 @@ -# Stubs for email.generator (Python 3.4) - from email.message import Message from email.policy import Policy from typing import BinaryIO, Optional, TextIO diff --git a/stdlib/3/email/header.pyi b/stdlib/3/email/header.pyi index b4d56aca9..1a5e1a2e4 100644 --- a/stdlib/3/email/header.pyi +++ b/stdlib/3/email/header.pyi @@ -1,5 +1,3 @@ -# Stubs for email.header (Python 3.4) - from email.charset import Charset from typing import Any, List, Optional, Tuple, Union diff --git a/stdlib/3/email/headerregistry.pyi b/stdlib/3/email/headerregistry.pyi index 78248d723..4ccb4d312 100644 --- a/stdlib/3/email/headerregistry.pyi +++ b/stdlib/3/email/headerregistry.pyi @@ -1,5 +1,3 @@ -# Stubs for email.headerregistry (Python 3.4) - from datetime import datetime as _datetime from email.errors import MessageDefect from email.policy import Policy diff --git a/stdlib/3/email/iterators.pyi b/stdlib/3/email/iterators.pyi index 4f85a6c87..2b3d14c2e 100644 --- a/stdlib/3/email/iterators.pyi +++ b/stdlib/3/email/iterators.pyi @@ -1,5 +1,3 @@ -# Stubs for email.iterators (Python 3.4) - from email.message import Message from typing import Iterator, Optional diff --git a/stdlib/3/email/message.pyi b/stdlib/3/email/message.pyi index 32aed781b..720d5e5d7 100644 --- a/stdlib/3/email/message.pyi +++ b/stdlib/3/email/message.pyi @@ -1,5 +1,3 @@ -# Stubs for email.message (Python 3.4) - from email.charset import Charset from email.contentmanager import ContentManager from email.errors import MessageDefect diff --git a/stdlib/3/email/mime/application.pyi b/stdlib/3/email/mime/application.pyi index c27d808a4..4df7b6e00 100644 --- a/stdlib/3/email/mime/application.pyi +++ b/stdlib/3/email/mime/application.pyi @@ -1,5 +1,3 @@ -# Stubs for email.mime.application (Python 3.4) - import sys from email.mime.nonmultipart import MIMENonMultipart from email.policy import Policy diff --git a/stdlib/3/email/mime/audio.pyi b/stdlib/3/email/mime/audio.pyi index 71d060bcb..39287cebb 100644 --- a/stdlib/3/email/mime/audio.pyi +++ b/stdlib/3/email/mime/audio.pyi @@ -1,5 +1,3 @@ -# Stubs for email.mime.audio (Python 3.4) - import sys from email.mime.nonmultipart import MIMENonMultipart from email.policy import Policy diff --git a/stdlib/3/email/mime/base.pyi b/stdlib/3/email/mime/base.pyi index 38c6130de..922bb170c 100644 --- a/stdlib/3/email/mime/base.pyi +++ b/stdlib/3/email/mime/base.pyi @@ -1,5 +1,3 @@ -# Stubs for email.mime.base (Python 3.4) - import email.message import sys from email.policy import Policy diff --git a/stdlib/3/email/mime/image.pyi b/stdlib/3/email/mime/image.pyi index d6d019ce5..a2a25885a 100644 --- a/stdlib/3/email/mime/image.pyi +++ b/stdlib/3/email/mime/image.pyi @@ -1,5 +1,3 @@ -# Stubs for email.mime.image (Python 3.4) - import sys from email.mime.nonmultipart import MIMENonMultipart from email.policy import Policy diff --git a/stdlib/3/email/mime/message.pyi b/stdlib/3/email/mime/message.pyi index 1c56208f1..78b33aa58 100644 --- a/stdlib/3/email/mime/message.pyi +++ b/stdlib/3/email/mime/message.pyi @@ -1,5 +1,3 @@ -# Stubs for email.mime.message (Python 3.4) - import sys from email.message import Message from email.mime.nonmultipart import MIMENonMultipart diff --git a/stdlib/3/email/mime/multipart.pyi b/stdlib/3/email/mime/multipart.pyi index 4c78fd4d5..5f572bd53 100644 --- a/stdlib/3/email/mime/multipart.pyi +++ b/stdlib/3/email/mime/multipart.pyi @@ -1,5 +1,3 @@ -# Stubs for email.mime.multipart (Python 3.4) - import sys from email.message import Message from email.mime.base import MIMEBase diff --git a/stdlib/3/email/mime/nonmultipart.pyi b/stdlib/3/email/mime/nonmultipart.pyi index 1fd3ea98b..4addff188 100644 --- a/stdlib/3/email/mime/nonmultipart.pyi +++ b/stdlib/3/email/mime/nonmultipart.pyi @@ -1,5 +1,3 @@ -# Stubs for email.mime.nonmultipart (Python 3.4) - from email.mime.base import MIMEBase class MIMENonMultipart(MIMEBase): ... diff --git a/stdlib/3/email/mime/text.pyi b/stdlib/3/email/mime/text.pyi index f219e843b..e088bffc7 100644 --- a/stdlib/3/email/mime/text.pyi +++ b/stdlib/3/email/mime/text.pyi @@ -1,5 +1,3 @@ -# Stubs for email.mime.text (Python 3.4) - import sys from email.mime.nonmultipart import MIMENonMultipart from email.policy import Policy diff --git a/stdlib/3/email/parser.pyi b/stdlib/3/email/parser.pyi index 355118291..f1e402408 100644 --- a/stdlib/3/email/parser.pyi +++ b/stdlib/3/email/parser.pyi @@ -1,5 +1,3 @@ -# Stubs for email.parser (Python 3.4) - import email.feedparser from email.message import Message from email.policy import Policy diff --git a/stdlib/3/email/policy.pyi b/stdlib/3/email/policy.pyi index 2ddb290b7..d0906ebf1 100644 --- a/stdlib/3/email/policy.pyi +++ b/stdlib/3/email/policy.pyi @@ -1,5 +1,3 @@ -# Stubs for email.policy (Python 3.4) - from abc import abstractmethod from email.contentmanager import ContentManager from email.errors import MessageDefect diff --git a/stdlib/3/email/utils.pyi b/stdlib/3/email/utils.pyi index f83feaec3..faf3a11d5 100644 --- a/stdlib/3/email/utils.pyi +++ b/stdlib/3/email/utils.pyi @@ -1,5 +1,3 @@ -# Stubs for email.utils (Python 3.4) - import datetime from email.charset import Charset from typing import List, Optional, Tuple, Union diff --git a/stdlib/3/encodings/__init__.pyi b/stdlib/3/encodings/__init__.pyi index 489e10623..d6f4389bc 100644 --- a/stdlib/3/encodings/__init__.pyi +++ b/stdlib/3/encodings/__init__.pyi @@ -1,6 +1,3 @@ -# This comment serves as a workaround for timothycrosley/isort#1027 and can -# be removed when a release with a fix was released. - import codecs from typing import Any diff --git a/stdlib/3/enum.pyi b/stdlib/3/enum.pyi index ed209cc48..860836f0b 100644 --- a/stdlib/3/enum.pyi +++ b/stdlib/3/enum.pyi @@ -1,4 +1,3 @@ -# NB: third_party/2/enum.pyi and stdlib/3.4/enum.pyi must remain consistent! import sys from abc import ABCMeta from typing import Any, Dict, Iterator, List, Mapping, Type, TypeVar, Union diff --git a/stdlib/3/fnmatch.pyi b/stdlib/3/fnmatch.pyi index 8f534753e..5311f13e8 100644 --- a/stdlib/3/fnmatch.pyi +++ b/stdlib/3/fnmatch.pyi @@ -1,8 +1,3 @@ -# Stubs for fnmatch - -# Based on http://docs.python.org/3.2/library/fnmatch.html and -# python-lib/fnmatch.py - from typing import AnyStr, Iterable, List def fnmatch(name: AnyStr, pat: AnyStr) -> bool: ... diff --git a/stdlib/3/gc.pyi b/stdlib/3/gc.pyi index 7e6eda8e1..841ffd8b3 100644 --- a/stdlib/3/gc.pyi +++ b/stdlib/3/gc.pyi @@ -1,5 +1,3 @@ -# Stubs for gc - import sys from typing import Any, Dict, List, Optional, Tuple diff --git a/stdlib/3/getopt.pyi b/stdlib/3/getopt.pyi index 0417a827a..c92be2a6a 100644 --- a/stdlib/3/getopt.pyi +++ b/stdlib/3/getopt.pyi @@ -1,7 +1,3 @@ -# Stubs for getopt - -# Based on http://docs.python.org/3.2/library/getopt.html - from typing import List, Tuple def getopt(args: List[str], shortopts: str, longopts: List[str] = ...) -> Tuple[List[Tuple[str, str]], List[str]]: ... diff --git a/stdlib/3/getpass.pyi b/stdlib/3/getpass.pyi index 9a155701f..aac162a51 100644 --- a/stdlib/3/getpass.pyi +++ b/stdlib/3/getpass.pyi @@ -1,5 +1,3 @@ -# Stubs for getpass - from typing import Optional, TextIO def getpass(prompt: str = ..., stream: Optional[TextIO] = ...) -> str: ... diff --git a/stdlib/3/glob.pyi b/stdlib/3/glob.pyi index e4a0a59a1..5244d0c8c 100644 --- a/stdlib/3/glob.pyi +++ b/stdlib/3/glob.pyi @@ -1,6 +1,3 @@ -# Stubs for glob -# Based on http://docs.python.org/3/library/glob.html - import sys from typing import AnyStr, Iterator, List, Union diff --git a/stdlib/3/hashlib.pyi b/stdlib/3/hashlib.pyi index 80618d0a9..6c4b783da 100644 --- a/stdlib/3/hashlib.pyi +++ b/stdlib/3/hashlib.pyi @@ -1,5 +1,3 @@ -# Stubs for hashlib - import sys from _typeshed import ReadableBuffer from typing import AbstractSet, Optional diff --git a/stdlib/3/heapq.pyi b/stdlib/3/heapq.pyi index 82c570fb5..391898f7c 100644 --- a/stdlib/3/heapq.pyi +++ b/stdlib/3/heapq.pyi @@ -1,7 +1,3 @@ -# Stubs for heapq - -# Based on http://docs.python.org/3.2/library/heapq.html - from typing import Any, Callable, Iterable, List, Optional, TypeVar _T = TypeVar("_T") diff --git a/stdlib/3/http/cookies.pyi b/stdlib/3/http/cookies.pyi index 2e0202930..fe2b4f927 100644 --- a/stdlib/3/http/cookies.pyi +++ b/stdlib/3/http/cookies.pyi @@ -1,5 +1,3 @@ -# Stubs for http.cookies (Python 3.5) - import sys from typing import Any, Dict, Generic, List, Mapping, Optional, TypeVar, Union diff --git a/stdlib/3/http/server.pyi b/stdlib/3/http/server.pyi index b98213026..995a089ad 100644 --- a/stdlib/3/http/server.pyi +++ b/stdlib/3/http/server.pyi @@ -1,5 +1,3 @@ -# Stubs for http.server (Python 3.4) - import email.message import socketserver import sys diff --git a/stdlib/3/itertools.pyi b/stdlib/3/itertools.pyi index d930050f1..55a7b409f 100644 --- a/stdlib/3/itertools.pyi +++ b/stdlib/3/itertools.pyi @@ -1,7 +1,3 @@ -# Stubs for itertools - -# Based on http://docs.python.org/3.2/library/itertools.html - import sys from typing import Any, Callable, Generic, Iterable, Iterator, Optional, Tuple, TypeVar, overload from typing_extensions import Literal diff --git a/stdlib/3/nntplib.pyi b/stdlib/3/nntplib.pyi index dbd55e2d1..7e7b7b84c 100644 --- a/stdlib/3/nntplib.pyi +++ b/stdlib/3/nntplib.pyi @@ -1,5 +1,3 @@ -# Stubs for nntplib (Python 3) - import datetime import socket import ssl diff --git a/stdlib/3/os/path.pyi b/stdlib/3/os/path.pyi index 2fe03bb1b..207c0be78 100644 --- a/stdlib/3/os/path.pyi +++ b/stdlib/3/os/path.pyi @@ -1,4 +1,3 @@ -# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent! import os import sys from _typeshed import AnyPath, BytesPath, StrPath diff --git a/stdlib/3/pipes.pyi b/stdlib/3/pipes.pyi index 658373e4c..2c2fd400a 100644 --- a/stdlib/3/pipes.pyi +++ b/stdlib/3/pipes.pyi @@ -1,7 +1,3 @@ -# Stubs for pipes - -# Based on http://docs.python.org/3.5/library/pipes.html - import os class Template: diff --git a/stdlib/3/platform.pyi b/stdlib/3/platform.pyi index 7ad678d88..73579dff3 100644 --- a/stdlib/3/platform.pyi +++ b/stdlib/3/platform.pyi @@ -1,5 +1,3 @@ -# Stubs for platform (Python 3.5) - import sys if sys.version_info < (3, 9): diff --git a/stdlib/3/queue.pyi b/stdlib/3/queue.pyi index 8e366b3bd..82fde5989 100644 --- a/stdlib/3/queue.pyi +++ b/stdlib/3/queue.pyi @@ -1,7 +1,3 @@ -# Stubs for queue - -# NOTE: These are incomplete! - import sys from threading import Condition, Lock from typing import Any, Generic, Optional, TypeVar diff --git a/stdlib/3/random.pyi b/stdlib/3/random.pyi index 439f9b520..a0c36984d 100644 --- a/stdlib/3/random.pyi +++ b/stdlib/3/random.pyi @@ -1,11 +1,3 @@ -# Stubs for random -# Ron Murawski -# Updated by Jukka Lehtosalo - -# based on http://docs.python.org/3.2/library/random.html - -# ----- random classes ----- - import _random import sys from typing import AbstractSet, Any, Callable, Iterable, List, MutableSequence, Optional, Sequence, Tuple, TypeVar, Union diff --git a/stdlib/3/re.pyi b/stdlib/3/re.pyi index 1f0173940..a0b815d90 100644 --- a/stdlib/3/re.pyi +++ b/stdlib/3/re.pyi @@ -1,10 +1,3 @@ -# Stubs for re -# Ron Murawski -# 'bytes' support added by Jukka Lehtosalo - -# based on: http://docs.python.org/3.2/library/re.html -# and http://hg.python.org/cpython/file/618ea5612e83/Lib/re.py - import sys from typing import Any, AnyStr, Callable, Iterator, List, Optional, Tuple, Union, overload diff --git a/stdlib/3/reprlib.pyi b/stdlib/3/reprlib.pyi index 4a1fac22f..39828ffc9 100644 --- a/stdlib/3/reprlib.pyi +++ b/stdlib/3/reprlib.pyi @@ -1,5 +1,3 @@ -# Stubs for reprlib (Python 3) - from array import array from typing import Any, Callable, Deque, Dict, FrozenSet, List, Set, Tuple diff --git a/stdlib/3/resource.pyi b/stdlib/3/resource.pyi index 4c136a44f..ec963c073 100644 --- a/stdlib/3/resource.pyi +++ b/stdlib/3/resource.pyi @@ -1,5 +1,3 @@ -# Stubs for resource - import sys from typing import NamedTuple, Optional, Tuple diff --git a/stdlib/3/signal.pyi b/stdlib/3/signal.pyi index 990443929..53d8caaca 100644 --- a/stdlib/3/signal.pyi +++ b/stdlib/3/signal.pyi @@ -1,5 +1,3 @@ -"""Stub file for the 'signal' module.""" - import sys from enum import IntEnum from types import FrameType diff --git a/stdlib/3/socketserver.pyi b/stdlib/3/socketserver.pyi index 257629a7e..08c4fca6c 100644 --- a/stdlib/3/socketserver.pyi +++ b/stdlib/3/socketserver.pyi @@ -1,6 +1,3 @@ -# NB: SocketServer.pyi and socketserver.pyi must remain consistent! -# Stubs for socketserver - import sys import types from socket import SocketType diff --git a/stdlib/3/sre_constants.pyi b/stdlib/3/sre_constants.pyi index b85f50d2d..2b411d5c6 100644 --- a/stdlib/3/sre_constants.pyi +++ b/stdlib/3/sre_constants.pyi @@ -1,5 +1,3 @@ -# Source: https://github.com/python/cpython/blob/master/Lib/sre_constants.py - from typing import Any, Dict, List, Optional, Union MAGIC: int diff --git a/stdlib/3/sre_parse.pyi b/stdlib/3/sre_parse.pyi index 76115a1cb..f200fe9c9 100644 --- a/stdlib/3/sre_parse.pyi +++ b/stdlib/3/sre_parse.pyi @@ -1,5 +1,3 @@ -# Source: https://github.com/python/cpython/blob/master/Lib/sre_parse.py - import sys from sre_constants import _NamedIntConstant as _NIC, error as _Error from typing import Any, Dict, FrozenSet, Iterable, List, Match, Optional, Pattern as _Pattern, Tuple, Union, overload diff --git a/stdlib/3/stat.pyi b/stdlib/3/stat.pyi index 78a9f3269..6fd2bc081 100644 --- a/stdlib/3/stat.pyi +++ b/stdlib/3/stat.pyi @@ -1,7 +1,3 @@ -# Stubs for stat - -# Based on http://docs.python.org/3.2/library/stat.html - import sys def S_ISDIR(mode: int) -> bool: ... diff --git a/stdlib/3/statistics.pyi b/stdlib/3/statistics.pyi index 1281a980e..cdda11c78 100644 --- a/stdlib/3/statistics.pyi +++ b/stdlib/3/statistics.pyi @@ -1,5 +1,3 @@ -# Stubs for statistics - import sys from decimal import Decimal from fractions import Fraction diff --git a/stdlib/3/string.pyi b/stdlib/3/string.pyi index 0cfb89193..a39e64dd3 100644 --- a/stdlib/3/string.pyi +++ b/stdlib/3/string.pyi @@ -1,7 +1,3 @@ -# Stubs for string - -# Based on http://docs.python.org/3.2/library/string.html - from typing import Any, Iterable, Mapping, Optional, Sequence, Tuple, Union ascii_letters: str diff --git a/stdlib/3/symbol.pyi b/stdlib/3/symbol.pyi index 59be57765..8f764f294 100644 --- a/stdlib/3/symbol.pyi +++ b/stdlib/3/symbol.pyi @@ -1,5 +1,3 @@ -# Stubs for symbol (Python 3) - import sys from typing import Dict diff --git a/stdlib/3/sys.pyi b/stdlib/3/sys.pyi index f843d5775..7c0e15ddc 100644 --- a/stdlib/3/sys.pyi +++ b/stdlib/3/sys.pyi @@ -1,8 +1,3 @@ -# Stubs for sys -# Ron Murawski - -# based on http://docs.python.org/3.2/library/sys.html - import sys from builtins import object as _object from importlib.abc import MetaPathFinder, PathEntryFinder diff --git a/stdlib/3/tracemalloc.pyi b/stdlib/3/tracemalloc.pyi index 16aef1fb4..95c81d0e3 100644 --- a/stdlib/3/tracemalloc.pyi +++ b/stdlib/3/tracemalloc.pyi @@ -1,5 +1,3 @@ -# Stubs for tracemalloc (Python 3.4+) - import sys from typing import List, Optional, Sequence, Tuple, Union, overload diff --git a/stdlib/3/types.pyi b/stdlib/3/types.pyi index 1225ba3d5..38095b77b 100644 --- a/stdlib/3/types.pyi +++ b/stdlib/3/types.pyi @@ -1,8 +1,3 @@ -# Stubs for types -# Note, all classes "defined" here require special handling. - -# TODO parts of this should be conditional on version - import sys from typing import ( Any, @@ -25,6 +20,8 @@ from typing import ( # reasons exists in its own stub file (with ModuleSpec and Loader). from _importlib_modulespec import ModuleType as ModuleType # Exported +# Note, all classes "defined" here require special handling. + _T = TypeVar("_T") _T_co = TypeVar("_T_co", covariant=True) _T_contra = TypeVar("_T_contra", contravariant=True) diff --git a/stdlib/3/unittest/__init__.pyi b/stdlib/3/unittest/__init__.pyi index 1a5856c42..aadaa610a 100644 --- a/stdlib/3/unittest/__init__.pyi +++ b/stdlib/3/unittest/__init__.pyi @@ -1,5 +1,3 @@ -# Stubs for unittest - from typing import Optional from unittest.async_case import * from unittest.case import * diff --git a/stdlib/3/unittest/util.pyi b/stdlib/3/unittest/util.pyi index 7da86aaff..8b0e8ad28 100644 --- a/stdlib/3/unittest/util.pyi +++ b/stdlib/3/unittest/util.pyi @@ -1,4 +1,3 @@ -# undocumented from typing import Any, List, Sequence, Tuple, TypeVar _T = TypeVar("_T") diff --git a/stdlib/3/urllib/parse.pyi b/stdlib/3/urllib/parse.pyi index 91ef41888..d9ecfa4b6 100644 --- a/stdlib/3/urllib/parse.pyi +++ b/stdlib/3/urllib/parse.pyi @@ -1,4 +1,3 @@ -# Stubs for urllib.parse import sys from typing import Any, AnyStr, Callable, Dict, Generic, List, Mapping, NamedTuple, Optional, Sequence, Tuple, Union, overload diff --git a/stdlib/3/urllib/response.pyi b/stdlib/3/urllib/response.pyi index 4d7a2511b..c8f9d75d2 100644 --- a/stdlib/3/urllib/response.pyi +++ b/stdlib/3/urllib/response.pyi @@ -1,5 +1,3 @@ -# private module, we only expose what's needed - from email.message import Message from types import TracebackType from typing import IO, Any, BinaryIO, Callable, Iterable, List, Optional, Tuple, Type, TypeVar diff --git a/stdlib/3/urllib/robotparser.pyi b/stdlib/3/urllib/robotparser.pyi index 2c7bbbb7c..5e99b285c 100644 --- a/stdlib/3/urllib/robotparser.pyi +++ b/stdlib/3/urllib/robotparser.pyi @@ -1,5 +1,3 @@ -# Stubs for urllib.robotparser (Python 3.4) - import sys from typing import Iterable, List, NamedTuple, Optional diff --git a/stdlib/3/zipapp.pyi b/stdlib/3/zipapp.pyi index d09c244ab..e1b38e971 100644 --- a/stdlib/3/zipapp.pyi +++ b/stdlib/3/zipapp.pyi @@ -1,5 +1,3 @@ -# Stubs for zipapp (Python 3.5+) - import sys from pathlib import Path from typing import BinaryIO, Callable, Optional, Union diff --git a/third_party/2/OpenSSL/crypto.pyi b/third_party/2/OpenSSL/crypto.pyi index 4a8389ce7..9fcf39938 100644 --- a/third_party/2/OpenSSL/crypto.pyi +++ b/third_party/2/OpenSSL/crypto.pyi @@ -1,5 +1,3 @@ -# Stubs for OpenSSL.crypto (Python 2) - from datetime import datetime from typing import Any, Callable, Iterable, List, Optional, Set, Text, Tuple, Union diff --git a/third_party/2/enum.pyi b/third_party/2/enum.pyi index ed209cc48..860836f0b 100644 --- a/third_party/2/enum.pyi +++ b/third_party/2/enum.pyi @@ -1,4 +1,3 @@ -# NB: third_party/2/enum.pyi and stdlib/3.4/enum.pyi must remain consistent! import sys from abc import ABCMeta from typing import Any, Dict, Iterator, List, Mapping, Type, TypeVar, Union diff --git a/third_party/2/six/moves/urllib/parse.pyi b/third_party/2/six/moves/urllib/parse.pyi index 3bfb7f51f..569b07324 100644 --- a/third_party/2/six/moves/urllib/parse.pyi +++ b/third_party/2/six/moves/urllib/parse.pyi @@ -1,4 +1,3 @@ -# Stubs for six.moves.urllib.parse from urllib import ( quote as quote, quote_plus as quote_plus, diff --git a/third_party/2/six/moves/urllib/request.pyi b/third_party/2/six/moves/urllib/request.pyi index e76109971..549bd407c 100644 --- a/third_party/2/six/moves/urllib/request.pyi +++ b/third_party/2/six/moves/urllib/request.pyi @@ -1,4 +1,3 @@ -# Stubs for six.moves.urllib.request from urllib import ( FancyURLopener as FancyURLopener, URLopener as URLopener, diff --git a/third_party/2/six/moves/urllib/response.pyi b/third_party/2/six/moves/urllib/response.pyi index e6cf099a7..b560da8a5 100644 --- a/third_party/2/six/moves/urllib/response.pyi +++ b/third_party/2/six/moves/urllib/response.pyi @@ -1,2 +1 @@ -# Stubs for six.moves.urllib.response from urllib import addbase as addbase, addclosehook as addclosehook, addinfo as addinfo, addinfourl as addinfourl diff --git a/third_party/2and3/cachetools/func.pyi b/third_party/2and3/cachetools/func.pyi index f9ebc79e1..04f72b94c 100644 --- a/third_party/2and3/cachetools/func.pyi +++ b/third_party/2and3/cachetools/func.pyi @@ -1,11 +1,11 @@ -from typing import Any, Callable, Optional, Sequence, TypeVar - -_T = TypeVar("_T") - -_F = TypeVar("_F", bound=Callable[..., Any]) -_RET = Callable[[_F], _F] - -def lfu_cache(maxsize: int = ..., typed: bool = ...) -> _RET: ... -def lru_cache(maxsize: int = ..., typed: bool = ...) -> _RET: ... -def rr_cache(maxsize: int = ..., choice: Optional[Callable[[Sequence[_T]], _T]] = ..., typed: bool = ...) -> _RET: ... -def ttl_cache(maxsize: int = ..., ttl: float = ..., timer: float = ..., typed: bool = ...) -> _RET: ... +from typing import Any, Callable, Optional, Sequence, TypeVar + +_T = TypeVar("_T") + +_F = TypeVar("_F", bound=Callable[..., Any]) +_RET = Callable[[_F], _F] + +def lfu_cache(maxsize: int = ..., typed: bool = ...) -> _RET: ... +def lru_cache(maxsize: int = ..., typed: bool = ...) -> _RET: ... +def rr_cache(maxsize: int = ..., choice: Optional[Callable[[Sequence[_T]], _T]] = ..., typed: bool = ...) -> _RET: ... +def ttl_cache(maxsize: int = ..., ttl: float = ..., timer: float = ..., typed: bool = ...) -> _RET: ... diff --git a/third_party/2and3/click/__init__.pyi b/third_party/2and3/click/__init__.pyi index 5e01345f5..b588e6cef 100644 --- a/third_party/2and3/click/__init__.pyi +++ b/third_party/2and3/click/__init__.pyi @@ -1,19 +1,3 @@ -# -*- coding: utf-8 -*- -""" - click - ~~~~~ - - Click is a simple Python module that wraps the stdlib's optparse to make - writing command line scripts fun. Unlike other modules, it's based around - a simple API that does not come with too much magic and is composable. - - In case optparse ever gets removed from the stdlib, it will be shipped by - this module. - - :copyright: (c) 2014 by Armin Ronacher. - :license: BSD, see LICENSE for more details. -""" - from .core import ( Argument as Argument, BaseCommand as BaseCommand, diff --git a/third_party/2and3/flask/__init__.pyi b/third_party/2and3/flask/__init__.pyi index e9d72b829..4e66d4d02 100644 --- a/third_party/2and3/flask/__init__.pyi +++ b/third_party/2and3/flask/__init__.pyi @@ -1,7 +1,3 @@ -# Stubs for flask (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from jinja2 import Markup as Markup, escape as escape from werkzeug.exceptions import abort as abort from werkzeug.utils import redirect as redirect diff --git a/third_party/2and3/flask/app.pyi b/third_party/2and3/flask/app.pyi index 40f5ea0eb..30a476320 100644 --- a/third_party/2and3/flask/app.pyi +++ b/third_party/2and3/flask/app.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.app (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from datetime import timedelta from types import TracebackType from typing import ( diff --git a/third_party/2and3/flask/blueprints.pyi b/third_party/2and3/flask/blueprints.pyi index a1d0ef456..a003452bc 100644 --- a/third_party/2and3/flask/blueprints.pyi +++ b/third_party/2and3/flask/blueprints.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.blueprints (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any, Callable, Optional, Type, TypeVar, Union from .app import _ViewFunc diff --git a/third_party/2and3/flask/cli.pyi b/third_party/2and3/flask/cli.pyi index b92191e64..9083ebd5d 100644 --- a/third_party/2and3/flask/cli.pyi +++ b/third_party/2and3/flask/cli.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.cli (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any, Optional import click diff --git a/third_party/2and3/flask/config.pyi b/third_party/2and3/flask/config.pyi index c8897fb38..2b005422e 100644 --- a/third_party/2and3/flask/config.pyi +++ b/third_party/2and3/flask/config.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.config (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any, Dict, Optional class ConfigAttribute: diff --git a/third_party/2and3/flask/ctx.pyi b/third_party/2and3/flask/ctx.pyi index d37429db5..c3dd934a3 100644 --- a/third_party/2and3/flask/ctx.pyi +++ b/third_party/2and3/flask/ctx.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.ctx (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any, Optional class _AppCtxGlobals: diff --git a/third_party/2and3/flask/debughelpers.pyi b/third_party/2and3/flask/debughelpers.pyi index 499f0b487..45255a955 100644 --- a/third_party/2and3/flask/debughelpers.pyi +++ b/third_party/2and3/flask/debughelpers.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.debughelpers (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any class UnexpectedUnicodeError(AssertionError, UnicodeError): ... diff --git a/third_party/2and3/flask/globals.pyi b/third_party/2and3/flask/globals.pyi index d20dbfa27..c6043c726 100644 --- a/third_party/2and3/flask/globals.pyi +++ b/third_party/2and3/flask/globals.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.globals (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any from werkzeug.local import LocalStack diff --git a/third_party/2and3/flask/helpers.pyi b/third_party/2and3/flask/helpers.pyi index 17c1e7c44..928f8837c 100644 --- a/third_party/2and3/flask/helpers.pyi +++ b/third_party/2and3/flask/helpers.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.helpers (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any, Optional from .cli import AppGroup diff --git a/third_party/2and3/flask/json/__init__.pyi b/third_party/2and3/flask/json/__init__.pyi index 691d41d62..efdc8974f 100644 --- a/third_party/2and3/flask/json/__init__.pyi +++ b/third_party/2and3/flask/json/__init__.pyi @@ -1,4 +1,3 @@ -# Stubs for flask.json (Python 3.6) import json as _json from typing import Any diff --git a/third_party/2and3/flask/json/tag.pyi b/third_party/2and3/flask/json/tag.pyi index b1648dc79..c4dcf2833 100644 --- a/third_party/2and3/flask/json/tag.pyi +++ b/third_party/2and3/flask/json/tag.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.json.tag (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any, Optional class JSONTag: diff --git a/third_party/2and3/flask/logging.pyi b/third_party/2and3/flask/logging.pyi index 1cf47f0ed..75354cedc 100644 --- a/third_party/2and3/flask/logging.pyi +++ b/third_party/2and3/flask/logging.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.logging (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any def wsgi_errors_stream(): ... diff --git a/third_party/2and3/flask/sessions.pyi b/third_party/2and3/flask/sessions.pyi index 260680ffa..77c008b73 100644 --- a/third_party/2and3/flask/sessions.pyi +++ b/third_party/2and3/flask/sessions.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.sessions (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from abc import ABCMeta from typing import Any, MutableMapping, Optional diff --git a/third_party/2and3/flask/signals.pyi b/third_party/2and3/flask/signals.pyi index 0aa7ac32e..66238d0ae 100644 --- a/third_party/2and3/flask/signals.pyi +++ b/third_party/2and3/flask/signals.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.signals (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any, Optional signals_available: bool diff --git a/third_party/2and3/flask/templating.pyi b/third_party/2and3/flask/templating.pyi index 51d92797b..3f7aaae40 100644 --- a/third_party/2and3/flask/templating.pyi +++ b/third_party/2and3/flask/templating.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.templating (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any, Iterable, Text, Union from jinja2 import BaseLoader, Environment as BaseEnvironment diff --git a/third_party/2and3/flask/testing.pyi b/third_party/2and3/flask/testing.pyi index a02b40383..c3a652413 100644 --- a/third_party/2and3/flask/testing.pyi +++ b/third_party/2and3/flask/testing.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.testing (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import IO, Any, Iterable, Mapping, Optional, Text, TypeVar, Union from click import BaseCommand diff --git a/third_party/2and3/flask/views.pyi b/third_party/2and3/flask/views.pyi index b3a37007c..e61126375 100644 --- a/third_party/2and3/flask/views.pyi +++ b/third_party/2and3/flask/views.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.views (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any http_method_funcs: Any diff --git a/third_party/2and3/flask/wrappers.pyi b/third_party/2and3/flask/wrappers.pyi index b60da5ac3..590bea0b5 100644 --- a/third_party/2and3/flask/wrappers.pyi +++ b/third_party/2and3/flask/wrappers.pyi @@ -1,7 +1,3 @@ -# Stubs for flask.wrappers (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - from typing import Any, Dict, Optional from werkzeug.exceptions import HTTPException diff --git a/third_party/2and3/requests/__init__.pyi b/third_party/2and3/requests/__init__.pyi index c71416f65..6f72f86ba 100644 --- a/third_party/2and3/requests/__init__.pyi +++ b/third_party/2and3/requests/__init__.pyi @@ -1,5 +1,3 @@ -# Stubs for requests (based on version 2.6.0, Python 3) - import logging from typing import Any diff --git a/third_party/2and3/requests/adapters.pyi b/third_party/2and3/requests/adapters.pyi index d1efa51d6..d544ca1a9 100644 --- a/third_party/2and3/requests/adapters.pyi +++ b/third_party/2and3/requests/adapters.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.adapters (Python 3) - from typing import Any, Container, Mapping, Optional, Text, Tuple, Union from . import cookies, exceptions, models, structures, utils diff --git a/third_party/2and3/requests/api.pyi b/third_party/2and3/requests/api.pyi index bc2ee0cb5..85d46fc28 100644 --- a/third_party/2and3/requests/api.pyi +++ b/third_party/2and3/requests/api.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.api (Python 3) - from _typeshed import SupportsItems from typing import Iterable, Optional, Text, Tuple, Union diff --git a/third_party/2and3/requests/auth.pyi b/third_party/2and3/requests/auth.pyi index 0d4c70ff6..b3c3fd7d0 100644 --- a/third_party/2and3/requests/auth.pyi +++ b/third_party/2and3/requests/auth.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.auth (Python 3) - from typing import Any, Text, Union from . import cookies, models, status_codes, utils diff --git a/third_party/2and3/requests/compat.pyi b/third_party/2and3/requests/compat.pyi index b83b56f52..3e7983518 100644 --- a/third_party/2and3/requests/compat.pyi +++ b/third_party/2and3/requests/compat.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.compat (Python 3.4) - import collections OrderedDict = collections.OrderedDict diff --git a/third_party/2and3/requests/cookies.pyi b/third_party/2and3/requests/cookies.pyi index 5e3743b70..559c9e7a5 100644 --- a/third_party/2and3/requests/cookies.pyi +++ b/third_party/2and3/requests/cookies.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.cookies (Python 3) - import sys from typing import Any, MutableMapping diff --git a/third_party/2and3/requests/exceptions.pyi b/third_party/2and3/requests/exceptions.pyi index 7b173de25..6ad059a3c 100644 --- a/third_party/2and3/requests/exceptions.pyi +++ b/third_party/2and3/requests/exceptions.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.exceptions (Python 3) - from typing import Any from .packages.urllib3.exceptions import HTTPError as BaseHTTPError diff --git a/third_party/2and3/requests/hooks.pyi b/third_party/2and3/requests/hooks.pyi index 278076ad8..f706016ca 100644 --- a/third_party/2and3/requests/hooks.pyi +++ b/third_party/2and3/requests/hooks.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.hooks (Python 3) - from typing import Any HOOKS: Any diff --git a/third_party/2and3/requests/models.pyi b/third_party/2and3/requests/models.pyi index 46ac91849..7f2cfac71 100644 --- a/third_party/2and3/requests/models.pyi +++ b/third_party/2and3/requests/models.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.models (Python 3) - import datetime from typing import Any, Dict, Iterator, List, Optional, Text, Union diff --git a/third_party/2and3/requests/packages/urllib3/connection.pyi b/third_party/2and3/requests/packages/urllib3/connection.pyi index 8f68d67bc..4ba5ed586 100644 --- a/third_party/2and3/requests/packages/urllib3/connection.pyi +++ b/third_party/2and3/requests/packages/urllib3/connection.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.packages.urllib3.connection (Python 3.4) - import ssl import sys from typing import Any diff --git a/third_party/2and3/requests/packages/urllib3/fields.pyi b/third_party/2and3/requests/packages/urllib3/fields.pyi index 246010a18..df18769b7 100644 --- a/third_party/2and3/requests/packages/urllib3/fields.pyi +++ b/third_party/2and3/requests/packages/urllib3/fields.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.packages.urllib3.fields (Python 3.4) - from typing import Any def guess_content_type(filename, default=...): ... diff --git a/third_party/2and3/requests/sessions.pyi b/third_party/2and3/requests/sessions.pyi index 95dff28cf..3278fd782 100644 --- a/third_party/2and3/requests/sessions.pyi +++ b/third_party/2and3/requests/sessions.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.sessions (Python 3) - from typing import IO, Any, Callable, Iterable, List, Mapping, MutableMapping, Optional, Text, Tuple, Union from . import adapters, auth as _auth, compat, cookies, exceptions, hooks, models, status_codes, structures, utils diff --git a/third_party/2and3/requests/utils.pyi b/third_party/2and3/requests/utils.pyi index 1ee16991f..4c63bb733 100644 --- a/third_party/2and3/requests/utils.pyi +++ b/third_party/2and3/requests/utils.pyi @@ -1,5 +1,3 @@ -# Stubs for requests.utils (Python 3) - from typing import Any from . import compat, cookies, exceptions, structures diff --git a/third_party/2and3/tabulate.pyi b/third_party/2and3/tabulate.pyi index c3abb2f14..d046f36e3 100644 --- a/third_party/2and3/tabulate.pyi +++ b/third_party/2and3/tabulate.pyi @@ -1,4 +1,3 @@ -# Stub for tabulate: https://github.com/astanin/python-tabulate from typing import Any, Callable, Container, Iterable, List, Mapping, NamedTuple, Optional, Sequence, Union PRESERVE_WHITESPACE: bool diff --git a/third_party/2and3/termcolor.pyi b/third_party/2and3/termcolor.pyi index e5ef87f54..b890dcd1b 100644 --- a/third_party/2and3/termcolor.pyi +++ b/third_party/2and3/termcolor.pyi @@ -1,4 +1,3 @@ -# Stub for termcolor: https://pypi.python.org/pypi/termcolor from typing import Any, Iterable, Optional, Text def colored( diff --git a/third_party/2and3/ujson.pyi b/third_party/2and3/ujson.pyi index 694c3c1b2..f96d4754b 100644 --- a/third_party/2and3/ujson.pyi +++ b/third_party/2and3/ujson.pyi @@ -1,5 +1,3 @@ -# Stubs for ujson -# See: https://pypi.python.org/pypi/ujson from typing import IO, Any, AnyStr __version__: str diff --git a/third_party/3/pkg_resources/__init__.pyi b/third_party/3/pkg_resources/__init__.pyi index 225f58d8f..32ed2f76d 100644 --- a/third_party/3/pkg_resources/__init__.pyi +++ b/third_party/3/pkg_resources/__init__.pyi @@ -1,5 +1,3 @@ -# Stubs for pkg_resources (Python 3.4) - import importlib.abc import types import zipimport diff --git a/third_party/3/typed_ast/__init__.pyi b/third_party/3/typed_ast/__init__.pyi index f260032dd..e69de29bb 100644 --- a/third_party/3/typed_ast/__init__.pyi +++ b/third_party/3/typed_ast/__init__.pyi @@ -1,2 +0,0 @@ -# This module is a fork of the CPython 2 and 3 ast modules with PEP 484 support. -# See: https://github.com/python/typed_ast