You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This if block should be removed, but nothing changes. Even the Ruff documentation suggests using this slice syntax here, so it should work as expected.
If my
target-version
ispy38
, I expect the conditionif sys.version_info >= (3, 8):
to be dropped but it isn't.It gets dropped for
py37
, though.This is a regression introduced in #7284 while fixing #7258.
A minimal code snippet that reproduces the bug.
expected:
actual: (no lint and the file doesn't get fixed)
The command you invoked (e.g.,
ruff /path/to/file.py --fix
), ideally including the--isolated
flag.The current Ruff settings (any relevant sections from your
pyproject.toml
).The current Ruff version (
ruff --version
)The text was updated successfully, but these errors were encountered: