You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test.py:6: error: "ConfigParser" has no attribute "readfp"
Here's test.py, it runs correctly in both py2 and py3:
from io import open
from six.moves import configparser
cfg = configparser.ConfigParser()
with open ( 'test.ini', 'r', encoding='utf-8', errors='strict' ) as f:
cfg.readfp ( f )
assert cfg.get ( 'foo', 'bar' ) == 'hello'
The text was updated successfully, but these errors were encountered:
I was told this error might be a bug in typeshed:
https://stackoverflow.com/questions/50302677/mypy-error-configparser-has-no-attribute-readfp?noredirect=1#comment87627773_50302677
When I run this command, I get no errors:
mypy --py2 test.py
but when I run this:
mypy test.py
I get this:
test.py:6: error: "ConfigParser" has no attribute "readfp"
Here's test.py, it runs correctly in both py2 and py3:
The text was updated successfully, but these errors were encountered: