import sys
if sys.version_info[:2] < (3, 7):
print('oh no')
This if block should be removed with --fix, but nothing changes. The Ruff documentation even suggests using this slice syntax here, so this should work as expected. (Maybe a new linter rule could be added to remove this unnecessary slice syntax as well.)
ruff --target-version py37 --select UP036 --isolated test.py
Originally posted by @tdulcet in #7902 (comment)
This if block should be removed with
--fix, but nothing changes. The Ruff documentation even suggests using this slice syntax here, so this should work as expected. (Maybe a new linter rule could be added to remove this unnecessary slice syntax as well.)Originally posted by @tdulcet in #7902 (comment)