-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Linter panic] SIM105 with cpython\Lib\http\server.py #4374
Comments
The failing autofix is SIM105 "Use Command:
Minimized example: def a():
try:
pass
except OSError:
pass
import contextlib The problem occurs because the autofix can't deal with the import being behind the function scope |
I thought we had fixed this? I'll take a look. |
Unless you're already on it @konstin :) |
no i just wanted to write up the minimization, please continue on this |
I think #4373 is the same issue. |
Ah okay, I see. The issue is that we use the import from the surrounding scope, but we allow that to come after right now. |
Ruff Version
https://github.com/charliermarsh/ruff/tree/be6e00ef6e5efea68a8a1a0093611b26142b753d
Command(Powershell)
Terminal Content
Python File
Source https://github.com/python/cpython/tree/167072938342981b96d06d739cd97185207b64dd
Please change the file extension from txt to py
server.txt
Ruff settings
Nothing
The text was updated successfully, but these errors were encountered: