Stubgen some more stdlib modules.

Copy doctest.pyi from 3 to 2.7.
This commit is contained in:
Ben Darnell
2016-01-16 16:54:47 -05:00
parent 3a674645a5
commit b7b7da1a85
5 changed files with 144 additions and 0 deletions

9
stdlib/2.7/doctest.pyi Normal file
View File

@@ -0,0 +1,9 @@
# Stubs for doctest
# NOTE: These are incomplete!
from typing import Any, Tuple
# TODO arguments missing
def testmod(m: Any = ..., name: str = ..., globs: Any = ...,
verbose: bool = ...) -> Tuple[int, int]: ...

45
stdlib/2.7/platform.pyi Normal file
View File

@@ -0,0 +1,45 @@
# Stubs for platform (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
__copyright__ = ... # type: Any
DEV_NULL = ... # type: Any
def libc_ver(executable=..., lib='', version='', chunksize=2048): ...
def linux_distribution(distname='', version='', id='', supported_dists=..., full_distribution_name=1): ...
def dist(distname='', version='', id='', supported_dists=...): ...
class _popen:
tmpfile = ... # type: Any
pipe = ... # type: Any
bufsize = ... # type: Any
mode = ... # type: Any
def __init__(self, cmd, mode='', bufsize=None): ...
def read(self): ...
def readlines(self): ...
def close(self, remove=..., error=...): ...
__del__ = ... # type: Any
def popen(cmd, mode='', bufsize=None): ...
def win32_ver(release='', version='', csd='', ptype=''): ...
def mac_ver(release='', versioninfo=..., machine=''): ...
def java_ver(release='', vendor='', vminfo=..., osinfo=...): ...
def system_alias(system, release, version): ...
def architecture(executable=..., bits='', linkage=''): ...
def uname(): ...
def system(): ...
def node(): ...
def release(): ...
def version(): ...
def machine(): ...
def processor(): ...
def python_implementation(): ...
def python_version(): ...
def python_version_tuple(): ...
def python_branch(): ...
def python_revision(): ...
def python_build(): ...
def python_compiler(): ...
def platform(aliased=0, terse=0): ...

View File

View File

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

80
stdlib/3/numbers.pyi Normal file
View File

@@ -0,0 +1,80 @@
# Stubs for numbers (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
class Number:
__hash__ = ... # type: Any
class Complex(Number):
def __complex__(self): ...
def __bool__(self): ...
@property
def real(self): ...
@property
def imag(self): ...
def __add__(self, other): ...
def __radd__(self, other): ...
def __neg__(self): ...
def __pos__(self): ...
def __sub__(self, other): ...
def __rsub__(self, other): ...
def __mul__(self, other): ...
def __rmul__(self, other): ...
def __truediv__(self, other): ...
def __rtruediv__(self, other): ...
def __pow__(self, exponent): ...
def __rpow__(self, base): ...
def __abs__(self): ...
def conjugate(self): ...
def __eq__(self, other): ...
class Real(Complex):
def __float__(self): ...
def __trunc__(self): ...
def __floor__(self): ...
def __ceil__(self): ...
def __round__(self, ndigits=None): ...
def __divmod__(self, other): ...
def __rdivmod__(self, other): ...
def __floordiv__(self, other): ...
def __rfloordiv__(self, other): ...
def __mod__(self, other): ...
def __rmod__(self, other): ...
def __lt__(self, other): ...
def __le__(self, other): ...
def __complex__(self): ...
@property
def real(self): ...
@property
def imag(self): ...
def conjugate(self): ...
class Rational(Real):
@property
def numerator(self): ...
@property
def denominator(self): ...
def __float__(self): ...
class Integral(Rational):
def __int__(self): ...
def __index__(self): ...
def __pow__(self, exponent, modulus=None): ...
def __lshift__(self, other): ...
def __rlshift__(self, other): ...
def __rshift__(self, other): ...
def __rrshift__(self, other): ...
def __and__(self, other): ...
def __rand__(self, other): ...
def __xor__(self, other): ...
def __rxor__(self, other): ...
def __or__(self, other): ...
def __ror__(self, other): ...
def __invert__(self): ...
def __float__(self): ...
@property
def numerator(self): ...
@property
def denominator(self): ...