astral-sh/ruff

Fixing file with rules E302, I001 cause infinite loop

Open

#12.611 aberto em 1 de ago. de 2024

Ver no GitHub
 (3 comments) (1 reaction) (1 assignee)Rust (2.088 forks)batch import
bugfuzzerhelp wanted

Métricas do repositório

Stars
 (47.527 stars)
Métricas de merge de PR
 (Mesclagem média 5d 4h) (463 fundiu PRs em 30d)

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

Guia do colaborador