Files
typeshed/stdlib/3
Daniel Watkins 24a7bfb4bf Make configparser.RawConfigParser use SectionProxy where appropriate (#1527)
* Make configparser.RawConfigParser.__getitem__ return a SectionProxy

This reflects the code in the cpython tree and makes the following
(valid) code type-check correctly:

```
from configparser import ConfigParser

config = ConfigParser()
config.read_dict({'section': {'key': 'false'}})
assert config['section'].getboolean('key') is False
```

* RawConfigParser.items() returns SectionProxys not mappings

Because .items() uses __getitem__ to produce second item in each tuple.

* section argument to RawConfigParser.items is Optional

* Add comment explaining the status of RawConfigParser.items

TL;DR, we're hitting https://github.com/python/mypy/issues/3805 when
implemented correctly as an override, and
https://github.com/python/mypy/issues/1855 when we try to work around
that with a union.

* Correctly implement RawConfigParser.items overloading

* RawConfigParser.items(str) returns a List not an Iterable
2017-08-21 14:46:50 -07:00
..
2017-07-26 08:29:30 -07:00
2017-08-21 13:54:22 -07:00
2017-05-23 09:51:29 -07:00
2017-04-24 15:31:29 -07:00
2016-12-19 23:53:19 -08:00
2017-04-24 15:04:42 -07:00
2017-01-26 12:05:53 -08:00
2016-12-21 01:15:26 -08:00
2017-06-02 12:53:38 -07:00
2017-04-24 15:31:29 -07:00
2017-04-27 08:48:22 -07:00
2017-04-30 14:16:30 -07:00
2016-12-20 00:47:51 -08:00
2016-12-20 00:16:44 -08:00
2017-05-24 14:09:52 -07:00
2017-05-24 14:07:31 -07:00
2017-04-24 14:57:26 -07:00
2016-02-25 09:41:32 +00:00
2016-12-19 22:09:35 -08:00
2017-05-31 12:07:21 -07:00
2017-03-23 08:26:45 -07:00
2017-08-21 13:54:55 -07:00