typeshed: remove crufty comments (#4699)

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2020-10-23 00:40:06 -07:00
committed by GitHub
parent 3de732e188
commit 6ff5b88ca7
270 changed files with 16 additions and 684 deletions
-2
View File
@@ -1,5 +1,3 @@
# Stubs for BaseHTTPServer (Python 2.7)
import mimetools
import SocketServer
from typing import Any, BinaryIO, Callable, Mapping, Optional, Tuple, Union
-2
View File
@@ -1,5 +1,3 @@
# Stubs for CGIHTTPServer (Python 2.7)
import SimpleHTTPServer
from typing import List
-2
View File
@@ -1,5 +1,3 @@
# Stubs for Queue (Python 2)
from collections import deque
from typing import Any, Deque, Generic, Optional, TypeVar
-2
View File
@@ -1,5 +1,3 @@
# Stubs for SimpleHTTPServer (Python 2)
import BaseHTTPServer
from StringIO import StringIO
from typing import IO, Any, AnyStr, Mapping, Optional, Union
-3
View File
@@ -1,6 +1,3 @@
# NB: SocketServer.pyi and socketserver.pyi must remain consistent!
# Stubs for socketserver
import sys
import types
from socket import SocketType
-2
View File
@@ -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]):
-2
View File
@@ -1,5 +1,3 @@
"""Stub file for the '_collections' module."""
from typing import Any, Callable, Dict, Generic, Iterator, Optional, TypeVar, Union
_K = TypeVar("_K")
-2
View File
@@ -1,5 +1,3 @@
"""Stub file for the '_functools' module."""
from typing import Any, Callable, Dict, Iterable, Optional, Tuple, TypeVar, overload
_T = TypeVar("_T")
-5
View File
@@ -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: ...
-2
View File
@@ -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
-2
View File
@@ -1,5 +1,3 @@
"""Stub file for the '_struct' module."""
from typing import Any, AnyStr, Tuple
class error(Exception): ...
-1
View File
@@ -1,4 +1,3 @@
# Source: https://hg.python.org/cpython/file/2.7/Lib/_threading_local.py
from typing import Any
class _localbase(object): ...
-5
View File
@@ -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):
-2
View File
@@ -1,5 +1,3 @@
# These are not exported.
# These are exported.
from typing import (
AbstractSet,
Any,
-2
View File
@@ -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: ...
-2
View File
@@ -1,5 +1,3 @@
# Stubs for distutils.archive_util
from typing import Optional
def make_archive(
-2
View File
@@ -1,5 +1,3 @@
# Stubs for distutils.bcppcompiler
from distutils.ccompiler import CCompiler
class BCPPCompiler(CCompiler): ...
-2
View File
@@ -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]]]
-2
View File
@@ -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
-2
View File
@@ -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
-2
View File
@@ -1,5 +1,3 @@
# Stubs for distutils.cygwinccompiler
from distutils.unixccompiler import UnixCCompiler
class CygwinCCompiler(UnixCCompiler): ...
-2
View File
@@ -1,3 +1 @@
# Stubs for distutils.debug
DEBUG: bool
-2
View File
@@ -1,5 +1,3 @@
# Stubs for distutils.dep_util
from typing import List, Tuple
def newer(source: str, target: str) -> bool: ...
-2
View File
@@ -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]: ...
-1
View File
@@ -1,4 +1,3 @@
# Stubs for distutils.dist
from distutils.cmd import Command
from typing import Any, Dict, Iterable, Mapping, Optional, Text, Tuple, Type
-2
View File
@@ -1,5 +1,3 @@
# Stubs for emxccompiler
from distutils.unixccompiler import UnixCCompiler
class EMXCCompiler(UnixCCompiler): ...
-2
View File
@@ -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]
-2
View File
@@ -1,5 +1,3 @@
# Stubs for distutils.file_util
from typing import Optional, Sequence, Tuple
def copy_file(
-2
View File
@@ -1,3 +1 @@
# Stubs for distutils.filelist
class FileList: ...
-2
View File
@@ -1,5 +1,3 @@
# Stubs for distutils.msvccompiler
from distutils.ccompiler import CCompiler
class MSVCCompiler(CCompiler): ...
-2
View File
@@ -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: ...
-2
View File
@@ -1,5 +1,3 @@
# Stubs for distutils.sysconfig
from distutils.ccompiler import CCompiler
from typing import Mapping, Optional, Union
-2
View File
@@ -1,5 +1,3 @@
# Stubs for distutils.text_file
from typing import IO, List, Optional, Tuple, Union
class TextFile:
-2
View File
@@ -1,5 +1,3 @@
# Stubs for distutils.unixccompiler
from distutils.ccompiler import CCompiler
class UnixCCompiler(CCompiler): ...
-2
View File
@@ -1,5 +1,3 @@
# Stubs for distutils.util
from typing import Any, Callable, List, Mapping, Optional, Tuple
def get_platform() -> str: ...
-2
View File
@@ -1,5 +1,3 @@
# Stubs for email.mime.application
from email.mime.nonmultipart import MIMENonMultipart
from typing import Callable, Optional, Tuple, Union
-4
View File
@@ -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
-2
View File
@@ -1,5 +1,3 @@
# Stubs for gc
from typing import Any, List, Tuple
def enable() -> None: ...
-2
View File
@@ -1,5 +1,3 @@
# Stubs for getpass (Python 2)
from typing import IO, Any
class GetPassWarning(UserWarning): ...
-2
View File
@@ -1,5 +1,3 @@
# Stubs for hashlib (Python 2)
from typing import Tuple, Union
_DataType = Union[str, unicode, bytearray, buffer, memoryview]
-5
View File
@@ -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
-2
View File
@@ -1,5 +1,3 @@
"""Stubs for the 'imp' module."""
import types
from typing import IO, Any, Iterable, List, Optional, Tuple
-6
View File
@@ -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
-4
View File
@@ -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")
-2
View File
@@ -1,5 +1,3 @@
# Stubs for Python 2.7 md5 stdlib module
from hashlib import md5 as md5
new = md5
-2
View File
@@ -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")
-1
View File
@@ -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
-1
View File
@@ -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
-4
View File
@@ -1,7 +1,3 @@
# Stubs for platform (Python 2)
#
# Based on stub generated by stubgen.
from typing import Any, Optional, Tuple
__copyright__: Any
-8
View File
@@ -1,11 +1,3 @@
# Stubs for random
# Ron Murawski <ron@horizonchess.com>
# 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
-6
View File
@@ -1,9 +1,3 @@
# Stubs for re
# Ron Murawski <ron@horizonchess.com>
# 'bytes' support added by Jukka Lehtosalo
# based on: http: //docs.python.org/2.7/library/re.html
from typing import (
Any,
AnyStr,
-4
View File
@@ -1,7 +1,3 @@
# Stubs for rfc822 (Python 2)
#
# Based on stub generated by stubgen.
from typing import Any, Optional
class Message:
-1
View File
@@ -1,4 +1,3 @@
# Stubs for sets (Python 2)
from typing import Any, Callable, Hashable, Iterable, Iterator, MutableMapping, Optional, TypeVar, Union
_T = TypeVar("_T")
-2
View File
@@ -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: ...
-2
View File
@@ -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
-2
View File
@@ -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
-4
View File
@@ -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
-1
View File
@@ -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
-2
View File
@@ -1,5 +1,3 @@
"""Stub file for the 'strop' module."""
from typing import List, Sequence
lowercase: str
-4
View File
@@ -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]]
-2
View File
@@ -1,5 +1,3 @@
# Stubs for symbol (Python 2)
from typing import Dict
single_input: int
-2
View File
@@ -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
-1
View File
@@ -1,4 +1,3 @@
"""Stubs for the "thread" module."""
from typing import Any, Callable
def _count() -> int: ...
-3
View File
@@ -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
-2
View File
@@ -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
+2 -3
View File
@@ -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
-2
View File
@@ -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
-4
View File
@@ -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
-2
View File
@@ -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]
-4
View File
@@ -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: ...
-2
View File
@@ -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]: ...
-2
View File
@@ -1,5 +1,3 @@
# Stubs for xmlrpclib (Python 2)
from datetime import datetime
from gzip import GzipFile
from httplib import HTTPConnection, HTTPResponse, HTTPSConnection