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

Mark nonlocal variables as used in parent scopes #822

Merged
merged 1 commit into from
Nov 20, 2022
Merged

Conversation

charliermarsh
Copy link
Member

In #800, I modified our handling of StmtKind::Global to avoid setting a binding in every parent scope. This inadvertently changed the behavior for StmtKind::Nonlocal too (I just missed that it was the same pattern branch), causing us to not mark nonlocal variables as used at the defining site in the parent scope.

Resolves #820.

@charliermarsh charliermarsh merged commit 99f7854 into main Nov 20, 2022
@charliermarsh charliermarsh deleted the charlie/f841 branch November 20, 2022 00:21
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.

False positive for F841
1 participant