We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Bug Report
When using a TypeVar as typing for a function parameter, the --strict-equality checks are no longer executed.
--strict-equality
To Reproduce
from typing import TypeVar T = TypeVar("T", int, str) def a(x: T) -> None: 1 == "a" def b(x: int | str) -> None: 1 == "a" a(1) b(1)
Playground: https://mypy-play.net/?mypy=master&python=3.10&flags=strict&gist=60fa0e9e47a0ed5683357b1fa2611477
Expected Behavior
I would expect both functions a() and b() to raise the comparison-overlap error.
a()
b()
comparison-overlap
Actual Behavior
Only function b() where there is no TypeVar used raises the comparison-overlap error.
Note that other, standard, mypy checks are executed and flagged in both functions.
Your Environment
--strict
mypy.ini
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report
When using a TypeVar as typing for a function parameter, the
--strict-equality
checks are no longer executed.To Reproduce
Playground: https://mypy-play.net/?mypy=master&python=3.10&flags=strict&gist=60fa0e9e47a0ed5683357b1fa2611477
Expected Behavior
I would expect both functions
a()
andb()
to raise thecomparison-overlap
error.Actual Behavior
Only function
b()
where there is no TypeVar used raises thecomparison-overlap
error.Note that other, standard, mypy checks are executed and flagged in both functions.
Your Environment
--strict
or--strict-equality
mypy.ini
(and other config files): -The text was updated successfully, but these errors were encountered: