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
If a decorator fails to apply, then the error gets noted as the start of the decorator chain.
I expected to find an issue already made about this, but I found nothing. I would not be surprised if this is a duplicate though.
To Reproduce
from collections.abc import Callable def faulty(c: Callable[[int], None]) -> Callable[[tuple[int, int]], None]: return lambda x: None @faulty # 2 errors reported here @faulty def f(x: str) -> None: return None
Interestingly, if faulty returns Callable[[str], None] this only reports 1 error. I assume this is an artifact of error deduplication.
faulty
Callable[[str], None]
Expected Behavior
Different line numbers.
Actual Behavior
Same line numbers.
Your Environment
Checked on mypy playground.
mypy.ini
The text was updated successfully, but these errors were encountered:
Fix line number for decorator issues
0d014c6
Fixes python#18391
9bf5169
Successfully merging a pull request may close this issue.
Bug Report
If a decorator fails to apply, then the error gets noted as the start of the decorator chain.
I expected to find an issue already made about this, but I found nothing. I would not be surprised if this is a duplicate though.
To Reproduce
Interestingly, if
faulty
returnsCallable[[str], None]
this only reports 1 error. I assume this is an artifact of error deduplication.Expected Behavior
Different line numbers.
Actual Behavior
Same line numbers.
Your Environment
Checked on mypy playground.
mypy.ini
(and other config files): N/AThe text was updated successfully, but these errors were encountered: