Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
ilevkivskyi merged 2 commits intopython:masterfromA5rocks:end-columns-are-good-1
Jan 27, 2025

Conversation

@A5rocks
Copy link
Collaborator

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.

@A5rocksA5rocks added the topic-error-reportingHow we report errors labelJan 26, 2025
@A5rocks
Copy link
CollaboratorAuthor

A5rocks commentedJan 26, 2025
edited
Loading

@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--pretty's output like this.)

(... 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)

@github-actions
Copy link
Contributor

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
Copy link
Member

I assume this means this PR is a step in the wrong direction: what exactly should happen instead?

Not necessarily, I think this is a meaningful quick fix. Long term type annotations (essentially whatUnboundTypes are) should be part of syntax tree. While actual types should have a base class that doesn't inherit fromContext. TBH I didn't thought it through yet, but this is a rough idea.

@ilevkivskyiilevkivskyi merged commit82f4e88 intopython:masterJan 27, 2025
18 checks passed
@A5rocksA5rocks deleted the end-columns-are-good-1 branchJanuary 27, 2025 23:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ilevkivskyiilevkivskyiilevkivskyi approved these changes

Assignees

No one assigned

Labels

topic-error-reportingHow we report errors

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

type-arg errors are over a larger node than necessary

2 participants

@A5rocks@ilevkivskyi

[8]ページ先頭

©2009-2025 Movatter.jp