astral-sh/ruff

Fixing file with rules E302, I001 cause infinite loop

Open

#12 611 ouverte le 1 août 2024

Voir sur GitHub
 (3 commentaires) (1 réaction) (1 assigné)Rust (2 088 forks)batch import
bugfuzzerhelp wanted

Métriques du dépôt

Stars
 (47 527 stars)
Métriques de merge PR
 (Merge moyen 5j 4h) (463 PRs mergées en 30 j)

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

python_compressed.zip

Guide contributeur