#1286 Remove header comments from stubs (#1292)

- Updates documentation related to previously required comment headers.
- Removes all comment headers from stubs
- Occasionally included a header for stubs that were noted to be incomplete or contained todo's.
This commit is contained in:
Emily Morehouse
2017-05-22 15:14:15 -07:00
committed by Guido van Rossum
parent a2aa93ac29
commit b6d08b81a3
354 changed files with 2 additions and 1404 deletions

View File

@@ -135,9 +135,6 @@ rule is that they should be as concise as possible. Specifically:
names, or methods and fields within a single class;
* use a single blank line between top-level class definitions, or none
if the classes are very small;
* add a top-level comment followed by an empty line that makes it clear
the file contains a stub and not the actual code for the module,
for example `# Stubs for pathlib (Python 3.4)`;
* do not use docstrings.
Imports in stubs are considered private (not part of the exported API)
@@ -157,11 +154,6 @@ Type variables and aliases you introduce purely for legibility reasons
should be prefixed with an underscore to make it obvious to the reader
they are not part of the stubbed API.
Finally, remember to include a comment on the top of your file about the
version of the Python language your stubs were tested against and
version of the library they were built for. This makes it easier to
maintain the stubs in the future.
NOTE: there are stubs in this repository that don't conform to the
style described above. Fixing them is a great starting point for new
contributors.

View File

@@ -1,7 +1,3 @@
# Stubs for Cookie (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class CookieError(Exception): ...

View File

@@ -1,7 +1,3 @@
# Stubs for cookielib (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class Cookie:

View File

@@ -1,7 +1,3 @@
# Stubs for csv (Python 2.7)
#
# NOTE: Based on a dynamically typed stub automatically generated by stubgen.
from typing import Any, Dict, Iterable, List, Sequence, Type, Union
# Public interface of _csv.reader's return type

View File

@@ -1,7 +1,3 @@
# Stubs for email.MIMEText (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from email.mime.nonmultipart import MIMENonMultipart
class MIMEText(MIMENonMultipart):

View File

@@ -1,7 +1,3 @@
# Stubs for email._parseaddr (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
def parsedate_tz(data): ...

View File

@@ -1,6 +1,4 @@
# Stubs for email.mime.base (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
# NOTE: This stub is incomplete.
# import message

View File

@@ -1,7 +1,3 @@
# Stubs for email.mime.multipart (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from email.mime.base import MIMEBase
class MIMEMultipart(MIMEBase):

View File

@@ -1,7 +1,3 @@
# Stubs for email.mime.nonmultipart (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from email.mime.base import MIMEBase
class MIMENonMultipart(MIMEBase):

View File

@@ -1,7 +1,3 @@
# Stubs for email.mime.text (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from email.mime.nonmultipart import MIMENonMultipart
class MIMEText(MIMENonMultipart):

View File

@@ -1,7 +1,3 @@
# Stubs for email.utils (Python 2)
#
# Derived from stub automatically generated by stubgen.
from email._parseaddr import AddressList as _AddressList
from email._parseaddr import mktime_tz as mktime_tz
from email._parseaddr import parsedate as _parsedate

View File

@@ -1,7 +1,3 @@
# Stubs for genericpath (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
class _unicode: ...
def exists(path): ...

View File

@@ -1,7 +1,3 @@
# Stubs for gzip (Python 2)
#
# NOTE: Based on a dynamically typed stub automatically generated by stubgen.
from typing import Any, IO
import io

View File

@@ -1,7 +1,3 @@
# Stubs for htmlentitydefs (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Mapping
name2codepoint = ... # type: Mapping[str, int]

View File

@@ -1,7 +1,3 @@
# Stubs for linecache (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
def getline(filename, lineno, module_globals=None): ...
def clearcache(): ...
def checkcache(filename=None): ...

View File

@@ -1,7 +1,3 @@
# Stubs for mimetools (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
import rfc822

View File

@@ -1,7 +1,3 @@
# Stubs for multiprocessing (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from multiprocessing.process import Process as Process, current_process as current_process, active_children as active_children
from multiprocessing.util import SUBDEBUG as SUBDEBUG, SUBWARNING as SUBWARNING

View File

@@ -1,7 +1,3 @@
# Stubs for multiprocessing.process (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
def current_process(): ...

View File

@@ -1,7 +1,3 @@
# Stubs for multiprocessing.util (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
import threading

View File

@@ -1,4 +1,4 @@
# Stub for pdb (incomplete, only some global functions)
# NOTE: This stub is incomplete - only contains some global functions
from typing import Any, Dict

View File

@@ -1,7 +1,3 @@
# Stubs for posixpath (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, AnyStr, List
from genericpath import * # noqa: F403

View File

@@ -1,7 +1,3 @@
# Stubs for pydoc (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, AnyStr, Callable, Container, Dict, IO, List, Mapping, MutableMapping, Optional, Tuple, Type, Union
from mypy_extensions import NoReturn
from repr import Repr

View File

@@ -1,7 +1,3 @@
# Stubs for runpy (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class _TempModule:

View File

@@ -1,7 +1,3 @@
# Stubs for shutil (Python 2)
#
# NOTE: Based on a dynamically typed stub automatically generated by stubgen.
from typing import List, Iterable, Callable, IO, AnyStr, Any, Optional, Tuple, Sequence
class Error(EnvironmentError): ...

View File

@@ -1,7 +1,3 @@
# Stubs for smtplib (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class SMTPException(Exception): ...

View File

@@ -1,5 +1 @@
# Stubs for sqlite3 (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from sqlite3.dbapi2 import * # noqa: F403

View File

@@ -1,7 +1,3 @@
# Stubs for textwrap (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class _unicode: ...

View File

@@ -1,6 +1,3 @@
# Stubs for urllib (Python 2)
# NOTE: This dynamically typed stub was originally automatically generated by stubgen.
from typing import Any, Mapping, Union, Tuple, Sequence, IO
def url2pathname(pathname: str) -> str: ...

View File

@@ -1,7 +1,3 @@
# Stubs for weakref (Python 2)
#
# Based on stub automatically generated by stubgen.
from typing import Any, MutableMapping, Generic, Iterator, List, TypeVar
from _weakref import (getweakrefcount, getweakrefs, ref, proxy,
CallableProxyType, ProxyType, ReferenceType)

View File

@@ -1,7 +1,3 @@
# Stubs for wsgiref.validate (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class WSGIWarning(Warning): ...

View File

@@ -1,7 +1,3 @@
# Stubs for distutils.version (Python 2 and 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
import sys
from typing import Any

View File

@@ -1,5 +1,3 @@
# Stub for sched (Python 2 and 3)
import sys
from typing import Any, Callable, Dict, List, NamedTuple, Text, Tuple

View File

@@ -1,7 +1,3 @@
# Stubs for webbrowser (Python 3.4)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
import sys
from typing import Any, Optional, Callable, List, Text, Union, Sequence

View File

@@ -1,7 +1,3 @@
# Stubs for xml.sax (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
class SAXException(Exception):
def __init__(self, msg, exception=None): ...
def getMessage(self): ...

View File

@@ -1,7 +1,3 @@
# Stubs for xml.sax.handler (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
version = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for xml.sax.saxutils (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Mapping
from xml.sax import handler

View File

@@ -1,7 +1,3 @@
# Stubs for xml.sax.xmlreader (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
class XMLReader:
def __init__(self) -> None: ...
def parse(self, source): ...

View File

@@ -1,7 +1,3 @@
# Stubs for ipaddress (Python 3.4)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Iterator, Optional, Tuple, TypeVar, Union
_address = Union[bytes, int, str]

View File

@@ -1,7 +1,3 @@
# Stubs for _compression (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
import io

View File

@@ -1,7 +1,3 @@
# Stubs for _curses (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, BinaryIO, IO, Optional, Tuple, Union, overload
chtype = Union[str, bytes, int]

View File

@@ -1,7 +1,3 @@
# Stubs for csv (Python 3.4)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Iterable
QUOTE_ALL = ... # type: int

View File

@@ -1,7 +1,3 @@
# Stubs for curses (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from _curses import * # noqa: F403
# Stubgen imports a python version of has_key only if it's not present
# in _curses (which it is in this stub)

View File

@@ -1,7 +1,3 @@
# Stubs for gzip (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
import _compression

View File

@@ -1,7 +1,3 @@
# Stubs for html.entities (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
name2codepoint = ... # type: Any

View File

@@ -1,5 +1,3 @@
# Stub for pdb (incomplete, only some global functions)
from typing import Any, Dict
def run(statement: str,

View File

@@ -1,7 +1,3 @@
# Stubs for runpy (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class _TempModule:

View File

@@ -1,7 +1,3 @@
# Stubs for smtplib (Python 3.4)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class SMTPException(OSError): ...

View File

@@ -1,5 +1 @@
# Stubs for sqlite3 (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from sqlite3.dbapi2 import * # noqa: F403

View File

@@ -1,7 +1,3 @@
# Stubs for tkinter (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from tkinter.constants import * # noqa: F403

View File

@@ -1,7 +1,3 @@
# Stubs for tkinter.constants (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
NO = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for tkinter.ttk (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
import tkinter

View File

@@ -1,7 +1,3 @@
# Stubs for tokenize (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Callable, Generator, Iterable, List, NamedTuple, Optional, Union, Sequence, TextIO, Tuple
from builtins import open as _builtin_open
from token import * # noqa: F403

View File

@@ -1,7 +1,3 @@
# Stubs for wsgiref.validate (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class WSGIWarning(Warning): ...

View File

@@ -1,7 +1,3 @@
# Stubs for croniter.croniter (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class croniter:

View File

@@ -1,7 +1,3 @@
# Stubs for cryptography.hazmat.primitives.serialization (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from enum import Enum

View File

@@ -1,5 +1 @@
# Stubs for dateutil.tz (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from .tz import tzutc, tzoffset, tzlocal, tzfile, tzrange, tzstr, tzical, gettz, datetime_exists, datetime_ambiguous

View File

@@ -1,7 +1,3 @@
# Stubs for dateutil.tz._common (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
from datetime import datetime, tzinfo, timedelta

View File

@@ -1,7 +1,3 @@
# Stubs for dateutil.tz.tz (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, IO, List, Optional, Tuple, Union
import datetime
from ._common import tzname_in_python2 as tzname_in_python2, _tzinfo as _tzinfo

View File

@@ -1,7 +1,3 @@
# Stubs for fb303.FacebookService (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from thrift.Thrift import TProcessor

View File

@@ -1,7 +1,3 @@
# Stubs for google.protobuf.descriptor (Python 2.7)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from .message import Message

View File

@@ -1,7 +1,3 @@
# Stubs for google.protobuf.descriptor_pool (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional
class DescriptorPool:

View File

@@ -1,7 +1,3 @@
# Stubs for google.protobuf.internal.decoder (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
def ReadTag(buffer, pos): ...

View File

@@ -1,7 +1,3 @@
# Stubs for google.protobuf.internal.encoder (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
Int32Sizer = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for google.protobuf.internal.wire_format (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
TAG_TYPE_BITS = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for google.protobuf.message (Python 2.7)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Sequence, Optional, Tuple
from .descriptor import FieldDescriptor

View File

@@ -1,7 +1,3 @@
# Stubs for google.protobuf.message_factory (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Dict, Iterable, Optional, Type
from .message import Message

View File

@@ -1,7 +1,3 @@
# Stubs for google.protobuf.reflection (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
class GeneratedProtocolMessageType(type):
def __new__(cls, name, bases, dictionary): ...
def __init__(cls, name, bases, dictionary) -> None: ...

View File

@@ -1,7 +1,3 @@
# Stubs for google.protobuf.symbol_database
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Dict, Iterable, Type
from .descriptor import EnumDescriptor, FileDescriptor

View File

@@ -1,7 +1,3 @@
# Stubs for itsdangerous (Python 2.7)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from datetime import datetime
from itertools import izip
from typing import Any, Callable, IO, MutableMapping, Optional, Text, Tuple, Union

View File

@@ -1,3 +0,0 @@
# Stubs for kazoo (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

View File

@@ -1,7 +1,3 @@
# Stubs for kazoo.client (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
string_types = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for kazoo.exceptions (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class KazooException(Exception): ...

View File

@@ -1,3 +0,0 @@
# Stubs for kazoo.recipe (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

View File

@@ -1,7 +1,3 @@
# Stubs for kazoo.recipe.watchers (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
log = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for redis (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from . import client
from . import connection
from . import utils

View File

@@ -1,7 +1,3 @@
# Stubs for redis.client (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
SYM_EMPTY = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for redis.connection (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
ssl_available = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for redis.exceptions (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
class RedisError(Exception): ...
def __unicode__(self): ...

View File

@@ -1,7 +1,3 @@
# Stubs for redis.utils (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
HIREDIS_AVAILABLE = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for routes (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from . import mapper
from . import util

View File

@@ -1,7 +1,3 @@
# Stubs for routes.mapper (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
COLLECTION_ACTIONS = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for routes.util (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class RoutesException(Exception): ...

View File

@@ -1,7 +1,3 @@
# Stubs for scribe.scribe (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
import fb303.FacebookService

View File

@@ -1,7 +1,3 @@
# Stubs for scribe.ttypes (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
fastbinary = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for selenium.webdriver.remote.webdriver (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Dict, List, Optional
from .mobile import Mobile as Mobile
from selenium.webdriver.remote.webelement import WebElement

View File

@@ -1,7 +1,3 @@
# Stubs for selenium.webdriver.remote.webelement (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from selenium.webdriver.remote.webdriver import WebDriver
from typing import Any, Optional, Dict, List

View File

@@ -1,7 +1,3 @@
# Stubs for thrift.Thrift (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class TType:

View File

@@ -1,7 +1,3 @@
# Stubs for thrift.protocol.TBinaryProtocol (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from .TProtocol import TProtocolBase

View File

@@ -1,7 +1,3 @@
# Stubs for thrift.protocol.TProtocol (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from thrift.Thrift import TException

View File

@@ -1,7 +1,3 @@
# Stubs for thrift.protocol (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
# Names in __all__ with no definition:
# TBase
# TBinaryProtocol

View File

@@ -1,7 +1,3 @@
# Stubs for thrift.transport.TSocket (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from .TTransport import TTransportBase, TServerTransportBase

View File

@@ -1,7 +1,3 @@
# Stubs for thrift.transport.TTransport (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from thrift.Thrift import TException

View File

@@ -1,7 +1,3 @@
# Stubs for thrift.transport (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
# Names in __all__ with no definition:
# THttpClient
# TSocket

View File

@@ -1,7 +1,3 @@
# Stubs for tornado.concurrent (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
futures = ... # type: Any

View File

@@ -1,7 +1,3 @@
# Stubs for tornado.gen (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from collections import namedtuple

View File

@@ -1,7 +1,3 @@
# Stubs for tornado.httpclient (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from tornado.util import Configurable

View File

@@ -1,7 +1,3 @@
# Stubs for tornado.httpserver (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from tornado import httputil
from tornado.tcpserver import TCPServer

View File

@@ -1,7 +1,3 @@
# Stubs for tornado.httputil (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from tornado.util import ObjectDict
from collections import namedtuple

View File

@@ -1,7 +1,3 @@
# Stubs for tornado.ioloop (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from tornado.util import Configurable

View File

@@ -1,7 +1,3 @@
# Stubs for tornado.locks (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class _TimeoutGarbageCollector:

Some files were not shown because too many files have changed in this diff Show More