Skip to content
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

Fix re-processing cross-reference when node kind changes #17883

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

ilevkivskyi
Copy link
Member

This is quite a bad bug. Currently we rely on SymbolNode being updated in-place for all indirect references, but this is not the case when node kind (FuncDef, Decorator, etc.) changes, in this case a new SymbolNode is created. I fix this by forcing reprocessing if the node kind changes.

This currently blocks support for PEP 702, see #17476, so I will not wait for long before merging.

cc @JukkaL @hauntsaninja

Copy link
Contributor

github-actions bot commented Oct 6, 2024

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@ilevkivskyi ilevkivskyi merged commit b10d781 into python:master Oct 6, 2024
19 checks passed
@ilevkivskyi ilevkivskyi deleted the fix-indirect-kind branch October 6, 2024 13:25
JukkaL pushed a commit that referenced this pull request Oct 7, 2024
This is quite a bad bug. Currently we rely on `SymbolNode` being updated
in-place for all indirect references, but this is not the case when node
kind (`FuncDef`, `Decorator`, etc.) changes, in this case a _new_
`SymbolNode` is created. I fix this by forcing reprocessing if the node
kind changes.

This currently blocks support for PEP 702, see
#17476, so I will not wait for long
before merging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant