Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configparser : get() can take str arguments #492

Closed
jukebox opened this issue Aug 23, 2016 · 2 comments
Closed

configparser : get() can take str arguments #492

jukebox opened this issue Aug 23, 2016 · 2 comments

Comments

@jukebox
Copy link
Contributor

jukebox commented Aug 23, 2016

[juke@jhebert:~/snip/python/config] 1 % cat config.py 
import configparser
c = configparser.ConfigParser()
c.read("file")
c.get("foo", "bar")


[juke@jhebert:~/snip/python/config] % mypy config.py
config.py:4: error: Argument 2 to "get" of "Mapping" has incompatible type "str"; expected Dict[str, str]
@gvanrossum
Copy link
Member

Thanks for the report! Do you feel comfortable submitting a Pull Request to fix the issue?

@elazarg
Copy link
Contributor

elazarg commented Aug 26, 2016

The problem is with incorrectly declaring to subtype MutableMapping[str, Dict[str, str]]. ConfigParser.get() is incompatible with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants