Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Start propagating end columns/lines through fortype-arg errors#18533
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Specifically, this addressespython#18531
A5rocks commentedJan 26, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@ilevkivskyi you said in#17535 (comment) that you would like to get rid of using types as error contexts. I assume this means this PR is a step in the wrong direction: what exactly should happen instead? (At the very least I don't think there's something else with the necessary information to improve (... reading through the issue, is there a reason why error context can't just include the file? it would be a bit more memory but otherwise seems like a fine solution) |
Diff frommypy_primer, showing the effect of this PR on open source code: sphinx (https://github.com/sphinx-doc/sphinx)- sphinx/search/__init__.py:198: error: Name "nodes.meta" is not defined [name-defined]+ sphinx/search/__init__.py:198:11: error: Name "nodes.meta" is not defined [name-defined]pywin32 (https://github.com/mhammond/pywin32)- win32/Lib/win32timezone.py:913: error: Name "winreg._KeyType" is not defined [name-defined]+ win32/Lib/win32timezone.py:913:29: error: Name "winreg._KeyType" is not defined [name-defined]- win32/Lib/win32timezone.py:920: error: Name "winreg._KeyType" is not defined [name-defined]+ win32/Lib/win32timezone.py:920:19: error: Name "winreg._KeyType" is not defined [name-defined] |
ilevkivskyi commentedJan 27, 2025
Not necessarily, I think this is a meaningful quick fix. Long term type annotations (essentially what |
82f4e88 intopython:masterUh oh!
There was an error while loading.Please reload this page.
Fixes#18531
It feels like this is a completely unsupported case given how major elements of mypy such as semanal don't pass through end columns/lines. Is this intentional? If so I'm fine closing this PR/the relevant issue as not planned.