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
$ mypy test.py
Success: no issues found in 1 source file
$ python3 test.py
Traceback (most recent call last):
File "/tmp/test.py", line 3, in<module>
class A:
File "/tmp/test.py", line 4, in A
pathlib: pathlib.Path = pathlib.Path('/')
^^^^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute 'Path'. Did you mean: 'match'?
Expected Behavior
I would expect mypy to fail, possibly explaining why.
Actual Behavior
It succeeds, even though the type annotations cause a failure.
Your Environment
Mypy version used: mypy 1.10.0 (compiled: yes)
Python version used: Python 3.11.9
I had thought incorrectly that it was an issue with attrs python-attrs/attrs#1282 but @euresti provided the example to re-create the problem.
The text was updated successfully, but these errors were encountered:
This example file.
Expected Behavior
I would expect mypy to fail, possibly explaining why.
Actual Behavior
It succeeds, even though the type annotations cause a failure.
Your Environment
I had thought incorrectly that it was an issue with attrs python-attrs/attrs#1282 but @euresti provided the example to re-create the problem.
The text was updated successfully, but these errors were encountered: