Bug Report
I have a simpel dot dict implementation. But if I change something in my code somewhere else, mypy complains with weird errors. My current workaround is, to delete the mypy cache before each run
To Reproduce
(Write your steps here:)
- Clean the mypy cache
- Create
x.py
class DotDict(dict):
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
__getattr__ = dict.get
mypy x.py --> works fine
- Add
a=2 to the end of x.py
mypy x.py --> error
x.py:2: error: Incompatible types in assignment (expression has type "Callable[[Dict[_KT, _VT], _KT, _VT], None]", base class "object" defined the type as "Callable[[object, str, Any], None]")
x.py:3: error: Incompatible types in assignment (expression has type "Callable[[Dict[_KT, _VT], _KT], None]", base class "object" defined the type as "Callable[[object, str], None]")
Expected Behavior
No error
Actual Behavior
Error; seems like a caching issue
Your Environment
- Mypy version used: 0.910
- Mypy command-line flags: nothing
- Mypy configuration options from
mypy.ini (and other config files): nothing
- Python version used: 3.7.1
- Operating system and version: Linux
Bug Report
I have a simpel dot dict implementation. But if I change something in my code somewhere else, mypy complains with weird errors. My current workaround is, to delete the mypy cache before each run
To Reproduce
(Write your steps here:)
x.pymypy x.py--> works finea=2to the end ofx.pymypy x.py--> errorExpected Behavior
No error
Actual Behavior
Error; seems like a caching issue
Your Environment
mypy.ini(and other config files): nothing