astral-sh/ruff
View on GitHubFixing file with rules E302, I001 cause infinite loop
Open
#12,611 opened on Aug 1, 2024
bugfuzzerhelp wanted
Description
ruff 0.5.5+379 (a3e67abf4 2024-07-31)
ruff check *.py --select E302,I001 --no-cache --fix --unsafe-fixes --preview --output-format concise --isolated
file content(at the bottom should be attached raw, not formatted file - github removes some non-printable characters, so copying from here may not work):
import time
#替换环境
#测试环境,替换eb部分3台服务器及其代码
def web_replace():
bg=time.time()
error
/tmp/tmp_folder/data/5053444380204826248.py:1:1: I001 Import block is un-sorted or un-formatted
Found 501 errors (500 fixed, 1 remaining).
[*] 1 fixable with the --fix option.
debug error: Failed to converge after 500 iterations in `/tmp/tmp_folder/data/5053444380204826248.py` with rule codes I001:---
import time
#替换环境
#测试环境,替换eb部分3台服务器及其代码
def web_replace():
bg=time.time()
---
Ruff build, that was used to reproduce problem(compiled on Ubuntu 22.04 with relase mode + debug symbols + debug assertions + overflow checks) - https://github.com/qarmin/Automated-Fuzzer/releases/download/Nightly/ruff.7z