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

F841: unused local in 'with' statement with parethesised value does not converge #4901

Closed
Tracked by #4972
addisoncrump opened this issue Jun 6, 2023 · 0 comments · Fixed by #4906
Closed
Tracked by #4972
Assignees
Labels
bug Something isn't working

Comments

@addisoncrump
Copy link
Contributor

This is a really specific one. The following snippet prevents Ruff from converging:

def e():
  with (input('>')) as f:
    print(1)

To trigger this, the value specified in the with must be parethesised and the with must not be in the global scope of the script.

Discovered by #4822.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants