Jelle Zijlstra
cf6c563ce1
codecs: merge 2 and 3 stubs ( #960 )
2017-03-10 15:50:14 -08:00
Ivan Levkivskyi
bd5b33f3b1
Fix frozenset ( #979 )
2017-03-10 13:59:32 -08:00
Sebastian Meßmer
85866fe1b9
Fix unittest/mock.pyi ( #973 )
...
* Fix unittest/mock.pyi
Add a lot of missing types
* Fix formatting
* Make two and from_kall bool
* Further style fixes
* style fixes
2017-03-08 06:50:28 -08:00
Dominik Miedziński
4f51a4f2fc
Improve ABCMeta.register signature ( #962 )
...
* Improve ABCMeta.register signature
* Fix ABCMeta.register return type for Python 3.3+
2017-03-07 16:42:06 -08:00
Hong Minhee
aa54fc1958
Add missing attribs to urllib.response.addinfourl ( #968 )
2017-03-07 16:38:52 -08:00
Sebastian Meßmer
6ffaadbd67
Fix string.pyi ( #971 )
...
Add missing types for two arguments
2017-03-06 08:08:36 -08:00
Sebastian Meßmer
ba82ac08ed
Fix type stubs in type.pyi ( #970 )
...
Mypy recognized the type hints as parameter names. This fixes that.
2017-03-06 08:04:51 -08:00
Michael Walter
58efa1fe55
Update json.pyi ( #957 )
...
According to https://docs.python.org/3/library/json.html#json.loads , the s parameter can be "a str, bytes or bytearray instance".
2017-02-27 17:51:41 +00:00
David Euresti
91ff50ad7a
Fix AbstractDigestAuthHandler to have correct types.
2017-02-22 20:29:17 -08:00
David Euresti
70e39d9ad2
Fix and unify type of socket.getaddrinfo
2017-02-22 20:24:47 -08:00
David Euresti
da11ecf773
Add missing __init__ and isclosed to http.client.HTTPResponse
2017-02-22 20:18:15 -08:00
David Euresti
e3fb935ca4
Move opcode to 2and3 ( #938 )
...
* Move opcode to 2and3
* Fix python3 versions
* Fix tests
* Bring Dict back
2017-02-21 14:27:34 -08:00
David Euresti
1260d41cd1
Fix type of IO.writelines. ( #949 )
...
This lets you use generators to writelines
2017-02-21 14:25:00 -08:00
Andrey Vlasovskikh
295788b672
Missing special attributes of class instances inherited from object ( #943 )
...
* Missing special attributes of class instances inherited from object
* object.__reduce__ returns a tuple
It's up to its inheritors to return either a tuple or a string.
2017-02-20 11:50:14 -08:00
David Euresti
dbea48fc7a
Make 2nd argument to ModuleType an optional kwarg ( #941 )
2017-02-20 11:10:59 -08:00
Andrey Vlasovskikh
7212f23f7b
Added missing 'property' attributes
2017-02-20 11:04:27 -08:00
Andrey Vlasovskikh
43c1369901
More precise type for 'slice' constructor
...
start and stop arguments are required even though they can be None.
2017-02-20 11:03:30 -08:00
Richard Hansen
55d4c08a8e
Use BaseException for Future.exception() and .set_exception(). ( #935 )
...
The concurrent.futures.Future class's set_exception() method might be
called with a BaseException that is not an Exception, so change
set_exception()'s parameter type from Exception to BaseException. The
exception set via set_exception() is returned by exception(), so
change exception()'s return type from Exception to BaseException.
2017-02-15 08:19:49 -08:00
Ivan Levkivskyi
22c0353498
Add missing imports from typing ( #933 )
2017-02-14 10:59:00 -08:00
Jelle Zijlstra
a778704b30
add Counter, Deque, ChainMap ( #928 )
2017-02-11 10:52:09 -08:00
Jelle Zijlstra
e80b25d1be
allow instantiating ChainMap ( #929 )
...
A previous PR led mypy to refuse to instantiate ChainMap,
because it had unimplemented abstract methods.
This PR adds the abstract methods to the stub,
which is enough to persuade mypy to allow instantiating
ChainMap.
2017-02-11 10:10:13 -08:00
5j9
3973f5851a
Define __getitem__ for Match objects of Python 3.6 ( #925 )
...
In Python 3.6 __getitem__ was added as a new method for match objects.
m[g] is identical to m.group(g).
2017-02-09 15:23:52 -08:00
5j9
f192b8c784
Update count, (r)find, and (r)index type hints for bytes and bytearray ( #923 )
...
The above methods have changed in version 3.3 to also accept an integer in
the range 0 to 255 as the subsequence.
Fixes python/mypy#2831
2017-02-08 15:21:41 -08:00
Sunghyun Hwang
28f3fde09f
improve HTTPStatus type definition ( #920 )
2017-02-07 10:39:44 -08:00
David Euresti
db84eb7844
Fix hashlib to accept multiple data types ( #918 )
2017-02-06 17:24:48 -08:00
David Euresti
6eca1a04da
Some ssl fixes ( #919 )
...
Fix return of wrap_socket.
Add read, write, pending to SSLSocket
Fix argument to socket.setdefaulttimeout
2017-02-06 17:23:22 -08:00
Matt Kimball
31d4a4277b
Added 'shutil' API changes between 3.3 and 3.5 ( #915 )
...
As of Python 3.3, copymode, copystat, copy and copy2 take an
optional argument, 'follow_symlinks'.
As of Python 3.3, copytree and move return the destination.
As of Python 3.5, move takes an optional copy function.
As of Python 3.3, disk_usage, chown, which and get_terminal_size
were added.
2017-02-06 10:18:27 -08:00
Mike Patek
c760a4e949
Make OrderedDict inherit from Reversible ( #912 )
...
Fixes #904
2017-02-01 09:23:43 -08:00
syrrim
9625cc738f
Update accumulate signature to account for optional function arg ( #896 )
...
See https://docs.python.org/3/library/itertools.html#itertools.accumulate
2017-01-30 13:22:06 -08:00
Valérian Rousset
fe15d91041
merge */xml/etree into 2and3/xml/etree ( #899 )
...
Fixes #287 .
2017-01-30 13:19:28 -08:00
Mike Patek
1a49669711
Add quote_via argument to urlencode ( #897 )
...
Fixes #873
2017-01-30 12:03:52 -08:00
Mike Patek
0e7b2e1acf
Add 'sys.is_finalizing' function ( #898 )
...
Fixes #856
2017-01-30 10:25:39 -08:00
Andrey Vlasovskikh
92534805b5
Added missing special attributes for PY3 functions ( #875 )
2017-01-29 20:34:35 -08:00
Jelle Zijlstra
6e84021f56
ChainMap fixes ( #878 )
...
- It didn't exist before 3.3 (https://docs.python.org/3/library/collections.html#chainmap-objects )
- It's not a subclass of dict
2017-01-29 20:29:29 -08:00
Jelle Zijlstra
a9bb7f89d3
Fixes to subprocess.CompletedProcess ( #895 )
2017-01-29 20:16:49 -08:00
miedzinski
d486e2a8d5
Add typing.ClassVar ( fixes #888 ) ( #889 )
2017-01-29 17:15:04 -08:00
Andrey Vlasovskikh
bb33cb0119
Added __instancecheck__ and __subclasscheck__ to type ( #887 )
2017-01-29 11:17:01 -08:00
Andrey Vlasovskikh
8ce64ce782
Updates to slice built-in ( #891 )
...
Makes args and attributes optional.
2017-01-29 11:16:23 -08:00
Andrey Vlasovskikh
2b25b3ef6d
Argument of input() is not restricted to str ( #890 )
2017-01-29 10:34:32 -08:00
Andrey Vlasovskikh
c8435f4315
Added object.__sizeof__ ( #865 )
...
* Added object.__sizeof__
* Removed __sizeof__ inherited from object
* Made sqlite3 classes for Python 2 inherit from object
* Removed __sizeof__ inherited from object
2017-01-26 12:05:53 -08:00
Andrey Vlasovskikh
025f31dcc9
Added class super to builtins ( #867 )
2017-01-26 11:53:59 -08:00
Andrey Vlasovskikh
1d1a2e458c
Added methods of typing.NamedTuple ( #864 )
2017-01-26 11:52:59 -08:00
Bertrand Bonnefoy-Claudet
c5ffe4f1d9
Fix returned decoder/encoder types in codecs
2017-01-23 10:32:53 -08:00
Avy Faingezicht
abd2995bad
add stub for os.get_terminal_size in python3 ( #859 )
2017-01-23 09:06:39 -08:00
Alex Frieder
cf98162fca
Add __bool__ to numeric builtin types
2017-01-20 12:41:16 -08:00
Jukka Lehtosalo
f2579e532f
Update signature of dict.get ( #852 )
...
Without this change, mypy can't infer proper types for cases like
`d.get(k, [])` where it needs type context to infer the type of
`[]`. We add the value type to the second argument to `get` using
union types, and this provides the context. This doesn't affect
the effective signature of `get`, other than providing the type
context for mypy.
Also removed some related redundant method definitions where we can
just inherit the base class definition. This makes it easier to
keep the method signatures consistent.
Note that this requires a few mypy PRs before mypy will be able to
use this effectively:
* https://github.com/python/mypy/pull/2718
* https://github.com/python/mypy/pull/2715
2017-01-20 07:41:54 -08:00
Jelle Zijlstra
b96bd698ab
Fix return values of athrow and aclose. ( #845 )
...
I misread the PEP here (https://www.python.org/dev/peps/pep-0525/#asynchronous-generator-object ); both of these return the yielded type.
2017-01-19 12:21:51 -08:00
Jelle Zijlstra
df9d11bf71
add AsyncGenerator to typing.pyi, collections/abc.pyi and collections/__init__.pyi ( #815 )
...
This parallels https://github.com/python/typing/pull/346
2017-01-18 13:24:28 -08:00
Dylan Jenkinson
6339f88ae4
Updated the stub for builtins to change slice to take Optional[int] rather than just straight int.
2017-01-18 11:30:41 -08:00
Ethan
3b30996733
Change ast's parse signature to return Module ( #836 )
2017-01-17 09:49:41 -08:00