Skip to content

test_mypy.yml fails hilariously on Python 3.10 #767

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

Closed
hynek opened this issue Feb 25, 2021 · 0 comments · Fixed by #771
Closed

test_mypy.yml fails hilariously on Python 3.10 #767

hynek opened this issue Feb 25, 2021 · 0 comments · Fixed by #771
Assignees
Labels
Bug Typing Typing/stub/Mypy/PyRight related bugs.

Comments

@hynek
Copy link
Member

hynek commented Feb 25, 2021

The error list is long than my scrollback buffer, but here's an example:

/Users/hynek/FOSS/attrs/tests/test_mypy.yml:118:
E   pytest_mypy_plugins.utils.TypecheckAssertionError: Invalid output:
E   Expected:
E     main:6: error: Incompatible return value type (got "int", expected "str") (diff)
E     main:11: error: Incompatible return value type (got "int", expected "str") (diff)
E     main:16: error: Incompatible return value type (got "int", expected "str") (diff)
E     main:21: error: Incompatible return value type (got "int", expected "str") (diff)
E   Actual:
E     ../../../../../../Users/hynek/FOSS/attrs/.tox/py310/lib/python3.10/site-packages/mypy/typeshed/stdlib/3/types.pyi:334: error: Name '_NotImplementedType' is not defined (diff)
E     main:6: error: Incompatible return value type (got "int", expected "str") (diff)
E     main:11: error: Incompatible return value type (got "int", expected "str") (diff)
E     main:16: error: Incompatible return value type (got "int", expected "str") (diff)
E     main:21: error: Incompatible return value type (got "int", expected "str") (diff)
E
E   Alignment of first line difference:
E     E: main:6: error: Incompatible return value type (got "int", expected "str"...
E     A: ../../../../../../Users/hynek/FOSS/attrs/.tox/py310/lib/python3.10/site-...
E        ^

or

/Users/hynek/FOSS/attrs/tests/test_mypy.yml:277:
E   pytest_mypy_plugins.utils.TypecheckAssertionError: Invalid output:
E   Expected:
E     main:5: note: Revealed type is 'def (a: builtins.int) -> main.A' (diff)
E     main:7: error: Unsupported left operand type for < ("A") (diff)
E     main:8: error: Unsupported left operand type for <= ("A") (diff)
E     main:9: error: Unsupported left operand type for > ("A") (diff)
E     ...
E   Actual:
E     ../../../../../../Users/hynek/FOSS/attrs/.tox/py310/lib/python3.10/site-packages/mypy/typeshed/stdlib/3/types.pyi:334: error: Name '_NotImplementedType' is not defined (diff)
E     main:5: note: Revealed type is 'def (a: builtins.int) -> main.A' (diff)
E     main:7: error: Unsupported left operand type for < ("A") (diff)
E     main:8: error: Unsupported left operand type for <= ("A") (diff)
E     main:9: error: Unsupported left operand type for > ("A") (diff)
E     ...
E
E   Alignment of first line difference:
E     E: main:5: note: Revealed type is 'def (a: builtins.int) -> main.A'...
E     A: ../../../../../../Users/hynek/FOSS/attrs/.tox/py310/lib/python3.10/site-...
E        ^

I'm not sure what to do about it at all but I guess we should fix it going forward.

@hynek hynek added Bug Typing Typing/stub/Mypy/PyRight related bugs. labels Feb 25, 2021
@euresti euresti mentioned this issue Feb 25, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Typing Typing/stub/Mypy/PyRight related bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants