Skip to content

Fixing file with rules E302, E303 cause infinite loop #12589

@qarmin

Description

@qarmin

ruff 0.5.5+369 (138e70b 2024-07-30)

ruff check *.py --select E302,E303 --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):

def test_update():
  m=Model(0,0,'a',[])
  # todo(awinter): raw keys, jsonfields
def test_clientmodel():
  "this probably goes away with sync schemas"

error

/tmp/tmp_folder/data/16997152304333574087.py:5:1: E302 Expected 2 blank lines, found 1
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/16997152304333574087.py` with rule codes E302:---
def test_update():
  m=Model(0,0,'a',[])

  # todo(awinter): raw keys, jsonfields
def test_clientmodel():
  "this probably goes away with sync schemas"
---

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfuzzerSurfaced via fuzzing.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions