mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-06 01:47:41 +08:00
typeshed: remove crufty comments (#4699)
Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
"""Stub file for the '_bisect' module."""
|
||||
|
||||
from typing import MutableSequence, Optional, Sequence, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
"""Stub file for the '_codecs' module."""
|
||||
|
||||
import codecs
|
||||
import sys
|
||||
from typing import Any, Callable, Dict, Optional, Text, Tuple, Union
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
"""Stub file for the '_heapq' module."""
|
||||
|
||||
import sys
|
||||
from typing import Any, Callable, Iterable, List, Optional, TypeVar
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for _random
|
||||
|
||||
import sys
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for base64
|
||||
|
||||
import sys
|
||||
from typing import IO, Optional, Union
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Stubs for bisect
|
||||
from _bisect import *
|
||||
|
||||
bisect = bisect_right
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
"""Stub file for the 'cmath' module."""
|
||||
|
||||
import sys
|
||||
from typing import SupportsComplex, SupportsFloat, Tuple, Union
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for cmd (Python 2/3)
|
||||
|
||||
from typing import IO, Any, Callable, List, Optional, Tuple
|
||||
|
||||
class Cmd:
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for code
|
||||
|
||||
import sys
|
||||
from types import CodeType
|
||||
from typing import Any, Callable, Mapping, Optional
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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]: ...
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for copy
|
||||
|
||||
from typing import Any, Dict, Optional, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for ctypes
|
||||
|
||||
import sys
|
||||
from array import array
|
||||
from typing import (
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for ctypes.util
|
||||
|
||||
import sys
|
||||
from typing import Optional
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for errno
|
||||
|
||||
from typing import Mapping
|
||||
|
||||
errorcode: Mapping[int, str]
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for hmac
|
||||
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from types import ModuleType
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# Stubs for lib2to3 (Python 3.6)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for lib2to3.pgen2.literals (Python 3.6)
|
||||
|
||||
from typing import Dict, Match, Text
|
||||
|
||||
simple_escapes: Dict[Text, Text]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for lib2to3.pgen2.token (Python 3.6)
|
||||
|
||||
import sys
|
||||
from typing import Dict, Text
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for lib2to3.pygram (Python 3.6)
|
||||
|
||||
from lib2to3.pgen2.grammar import Grammar
|
||||
|
||||
class Symbols:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# Stubs for os.path
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
|
||||
import os
|
||||
import sys
|
||||
from _typeshed import AnyPath, BytesPath, StrPath
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for mimetypes
|
||||
|
||||
import sys
|
||||
from typing import IO, Dict, List, Optional, Sequence, Text, Tuple, Union
|
||||
|
||||
|
||||
@@ -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,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.
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for operator
|
||||
|
||||
import sys
|
||||
from typing import (
|
||||
Any,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for poplib (Python 2 and 3)
|
||||
|
||||
import socket
|
||||
import ssl
|
||||
import sys
|
||||
|
||||
@@ -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,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
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Stubs for pty (Python 2 and 3)
|
||||
import sys
|
||||
from typing import Callable, Iterable, Tuple, Union
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for readline
|
||||
|
||||
import sys
|
||||
from typing import Callable, Optional, Sequence
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for rlcompleter
|
||||
|
||||
import sys
|
||||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for site
|
||||
|
||||
import sys
|
||||
from typing import Iterable, List, Optional
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Stubs for smtpd (Python 2 and 3)
|
||||
import asynchat
|
||||
import asyncore
|
||||
import socket
|
||||
|
||||
@@ -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 <ron@horizonchess.com>
|
||||
# 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
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# Filip Hron <filip.hron@gmail.com>
|
||||
# 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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for stringprep (Python 2 and 3)
|
||||
|
||||
from typing import Text
|
||||
|
||||
def in_table_a1(code: Text) -> bool: ...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for sunau (Python 2 and 3)
|
||||
|
||||
import sys
|
||||
from typing import IO, Any, NamedTuple, NoReturn, Optional, Text, Tuple, Union
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for tty (Python 3.6)
|
||||
|
||||
from typing import IO, Union
|
||||
|
||||
_FD = Union[int, IO[str]]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Stubs for uu (Python 2 and 3)
|
||||
import sys
|
||||
from typing import BinaryIO, Optional, Text, Union
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Stubs for uuid
|
||||
|
||||
import sys
|
||||
from typing import Any, Optional, Text, Tuple
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Structs for xdrlib (Python 2 and 3)
|
||||
from typing import Callable, List, Sequence, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
# Stubs for xml.etree.cElementTree (Python 3.4)
|
||||
|
||||
from xml.etree.ElementTree import * # noqa: F403
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
"""Stub file for the 'zipimport' module."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
from types import CodeType, ModuleType
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Stubs for zlib
|
||||
import sys
|
||||
from array import array
|
||||
from typing import Any, Union
|
||||
|
||||
Reference in New Issue
Block a user