Commit Graph

8 Commits

Author SHA1 Message Date
speezepearson
e815c803a6 add ChainMap class to collections module (#361)
* add ChainMap class to collections module

* ...and add it for Python 2 as well.
2016-07-13 06:16:37 -07:00
Alvaro Caceres
122da1ca3f Add Any for collections.pyi 2016-06-15 15:57:55 -05:00
Alvaro Caceres
d0ac66f5f8 Use "..." for attribute values, instead of None, [], {} 2016-06-15 14:10:04 -05:00
Tim Simpson
ac9ade5374 Allow use of kwargs in MutableMapping.update (#252)
Discovered while adding MyPy for code that was implementing
MutableMapping and using the update function like this:

```python
class CaseInsensitiveDict(collections.MutableMapping):
    def __init__(self, data=None, **kwargs):
        # type: (dict, **Any) -> None
        self._store = dict()  # type: dict
        if data is None:
            data = {}
        self.update(data, **kwargs)
```

This commit adds kwargs to MutableMapping to allow this.

Shout out to Tim Abbott for assisting me with this.
2016-06-05 18:10:56 -07:00
rwbarton
2b80cdf75e Use overloading rather than Union for MutableMapping.update (#174)
See https://github.com/python/mypy/issues/1430 for motivation.
2016-05-01 17:50:01 +01:00
Tim Abbott
fcb63d2028 Add stubs for UserList, UserString, UserDict. 2016-01-27 21:36:47 -08:00
Matthias Kramm
94c9ce8fd0 Consistently use '= ...' for optional parameters. 2015-11-09 13:55:02 -08:00
Matthias Kramm
337abed05a add (overwrite with) mypy stubs, if available 2015-09-30 09:59:44 -07:00