Jelle Zijlstra
5d553c9584
apply black and isort ( #4287 )
...
* apply black and isort
* move some type ignores
2020-06-28 13:31:00 -07:00
Sebastian Rittau
c32e1e2280
Enable --disallow-any-generics for stubs ( #3288 )
2019-10-01 05:31:34 -07:00
Michael Lee
efb67946f8
Use variable annotations everywhere ( #2909 )
2019-04-13 10:40:52 +02:00
Joel Rosdahl
3eb66ba633
Add type annotation for collections.deque.__iadd__ ( #2774 )
...
* Add type annotation for collections.deque.__iadd__
Fixes #2771 .
2019-02-01 19:39:09 +01:00
Jelle Zijlstra
9e023e7586
minor namedtuple fixes ( #2227 )
...
- The extra arguments aren't keyword-only in 2.7.
- Added the `defaults` argument in 3.7 (https://docs.python.org/3.7/library/collections.html#collections.namedtuple ).
2018-08-19 03:47:10 +01:00
z33ky
c2c48424da
Add missing collections.defaultdict.__init__ overloads ( #1957 ) ( #1958 )
2018-03-17 08:22:11 -07:00
Chad Dombrova
ed9d08e93b
Collections that inherit from dict should should override copy() ( #1856 )
...
Solves issue #1642 . A previous attempt at this, #1656 ,
added __copy__ but omitted copy, and it did not properly use self-type.
2018-02-09 00:26:37 +00:00
Suren Nihalani
898299969c
typeshed: declare that ordereddict's copy returns ordereddict ( #1656 )
2017-10-08 21:15:11 -07:00
Jelle Zijlstra
be7490322b
Counter: fix return value of most_common() ( #1491 )
...
https://docs.python.org/3/library/collections.html#collections.Counter.most_common
https://docs.python.org/2/library/collections.html#collections.Counter.most_common
2017-07-19 20:29:32 +03:00
Semyon Proshev
5db571a8f3
Update typing.MutableMapping.update stubs to allow keyword-only arguments ( #1370 )
2017-05-30 21:44:10 -07:00
Semyon Proshev
f9872cafd8
Update collections and typing.NamedTuple ( #1276 )
...
* Update stubs for `collections` module in both Pythons.
* Update `typing.NamedTuple` stub to have `_source` attribute.
* Fix compatibility of `deque.index` signature with supertype `Sequence`
2017-05-27 15:01:40 -07:00
Jelle Zijlstra
b084bcd037
review exported names in collections stubs ( #1197 )
...
Fixes #709
I looked at dir(collections) in 2.7 and 3.6 and made sure the list of names matched the stubs.
2017-04-30 09:59:37 -07:00
Mike Patek
c760a4e949
Make OrderedDict inherit from Reversible ( #912 )
...
Fixes #904
2017-02-01 09:23:43 -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
Lucas Wiman
6d1edb285d
Expand several stdlib methods to accept unicode or str. ( #869 )
...
Expand several stdlib methods to accept unicode or str.
2017-01-27 16:03:25 +00:00
Roy Williams
33b81b9e2b
Add MutableSet to collections ( #691 )
2016-11-24 11:39:00 +00:00
Guido van Rossum
cb97bb54c0
Move 2.7 to 2 ( #635 )
...
Closes #579 .
2016-10-26 16:24:49 -07:00