mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 20:12:08 +08:00
Redo six.moves to be implemented purely using imports.
Based on https://github.com/python/typeshed/pull/21.
This commit is contained in:
42
third_party/2.7/six/moves/__init__.pyi
vendored
42
third_party/2.7/six/moves/__init__.pyi
vendored
@@ -1,24 +1,22 @@
|
||||
# Provisional stubs for six.moves (Python 2.7)
|
||||
|
||||
from typing import overload, TypeVar, Tuple, Iterable, Iterator
|
||||
|
||||
_T1 = TypeVar('_T1')
|
||||
_T2 = TypeVar('_T2')
|
||||
_T3 = TypeVar('_T3')
|
||||
_T4 = TypeVar('_T4')
|
||||
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2],
|
||||
iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3],
|
||||
iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2,
|
||||
_T3, _T4]]: ... # TODO more than four iterables
|
||||
|
||||
# For re-export.
|
||||
import cStringIO as cStringIO
|
||||
import cPickle as cPickle
|
||||
from cStringIO import StringIO as cStringIO
|
||||
from itertools import ifilter as filter
|
||||
from itertools import ifilterfalse as filterfalse
|
||||
from __builtin__ import raw_input as input
|
||||
from __builtin__ import intern as intern
|
||||
from itertools import imap as map
|
||||
from os import getcwdu as getcwd
|
||||
from os import getcwd as getcwdb
|
||||
from __builtin__ import xrange as range
|
||||
from __builtin__ import reload as reload_module
|
||||
from __builtin__ import reduce as reduce
|
||||
from pipes import quote as shlex_quote
|
||||
from StringIO import StringIO as StringIO
|
||||
from UserDict import UserDict as UserDict
|
||||
from UserList import UserList as UserList
|
||||
from UserString import UserString as UserString
|
||||
from __builtin__ import xrange as xrange
|
||||
from itertools import izip as zip
|
||||
from itertools import izip_longest as zip_longest
|
||||
import six.moves.cPickle as cPickle
|
||||
|
||||
6
third_party/2.7/six/moves/cPickle.pyi
vendored
Normal file
6
third_party/2.7/six/moves/cPickle.pyi
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# Generated by stubtool 0.1, DO NOT EDIT
|
||||
# See https://github.com/o11c/stubtool
|
||||
#
|
||||
# Stubs for six.moves.cPickle (Python 2.7)
|
||||
|
||||
from cPickle import *
|
||||
45
third_party/3/six/moves/__init__.pyi
vendored
45
third_party/3/six/moves/__init__.pyi
vendored
@@ -1,24 +1,25 @@
|
||||
# Provisional stubs for six.moves (Python 2.7)
|
||||
# Generated by stubtool 0.1, DO NOT EDIT
|
||||
# See https://github.com/o11c/stubtool
|
||||
#
|
||||
# Stubs for six.moves (Python 3.2)
|
||||
|
||||
from typing import overload, TypeVar, Tuple, Iterable, Iterator
|
||||
|
||||
_T1 = TypeVar('_T1')
|
||||
_T2 = TypeVar('_T2')
|
||||
_T3 = TypeVar('_T3')
|
||||
_T4 = TypeVar('_T4')
|
||||
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2],
|
||||
iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3],
|
||||
iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2,
|
||||
_T3, _T4]]: ... # TODO more than four iterables
|
||||
|
||||
# For re-export.
|
||||
from io import StringIO as cStringIO
|
||||
import pickle as cPickle
|
||||
from builtins import filter as filter
|
||||
from itertools import filterfalse as filterfalse
|
||||
from builtins import input as input
|
||||
from sys import intern as intern
|
||||
from builtins import map as map
|
||||
from os import getcwd as getcwd
|
||||
from os import getcwdb as getcwdb
|
||||
from builtins import range as range
|
||||
from imp import reload as reload_module
|
||||
from functools import reduce as reduce
|
||||
from shlex import quote as shlex_quote
|
||||
from io import StringIO as StringIO
|
||||
# from collections import UserDict as UserDict
|
||||
# from collections import UserList as UserList
|
||||
# from collections import UserString as UserString
|
||||
from builtins import range as xrange
|
||||
from builtins import zip as zip
|
||||
from itertools import zip_longest as zip_longest
|
||||
import six.moves.cPickle as cPickle
|
||||
|
||||
6
third_party/3/six/moves/cPickle.pyi
vendored
Normal file
6
third_party/3/six/moves/cPickle.pyi
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# Generated by stubtool 0.1, DO NOT EDIT
|
||||
# See https://github.com/o11c/stubtool
|
||||
#
|
||||
# Stubs for six.moves.cPickle (Python 3.2)
|
||||
|
||||
from pickle import *
|
||||
Reference in New Issue
Block a user