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
- case: testAttrsNewStyleClassPy2
mypy_config:
python_version = 2.7
main: |
import attr
@attr.s
class Good(object):
pass
@attr.s
class Bad: # E: attrs only works with new-style classes
pass
But it doesn't pass because the python_version = 2.7 line seems to be ignored. I believe it has to do with how mypy is run. mypy --python-version={current_interpreter}. But as there's no way to run mypy with python 2, then there's no way to test python2 types.
The text was updated successfully, but these errors were encountered:
Multiple problems with mypy / pytest-mypy-plugin interaction:
- Starting from mypy 1.4, output is dependant on python version by default, test suite fails for python < 3.10 unless conditional file tests are used
- 'python_version' mypy setting not honored (typeddjango/pytest-mypy-plugins#47)
- Even if above bug is fixed, it's impossible to upgrade because jinja2 doesn't support all chevron template, test suite needs substantial changes
OTOH, annotation itself is compatible with mypy 1.5 (not 1.6 tho)
I've got a test case that looks like this:
But it doesn't pass because the
python_version = 2.7
line seems to be ignored. I believe it has to do with how mypy is run.mypy --python-version={current_interpreter}
. But as there's no way to run mypy with python 2, then there's no way to test python2 types.The text was updated successfully, but these errors were encountered: