astral-sh/ruff

Fixing file with rules E302, I001 cause infinite loop

Open

#12.611 aperta il 1 ago 2024

Vedi su GitHub
 (3 commenti) (1 reazione) (1 assegnatario)Rust (2088 fork)batch import
bugfuzzerhelp wanted

Metriche repository

Star
 (47.527 star)
Metriche merge PR
 (Merge medio 3g 8h) (573 PR mergiate in 30 g)

Descrizione

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

python_compressed.zip

Guida contributor