Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infinite loop] Infinite loop related to noqa #3647

Closed
qarmin opened this issue Mar 21, 2023 · 0 comments · Fixed by #3650
Closed

[Infinite loop] Infinite loop related to noqa #3647

qarmin opened this issue Mar 21, 2023 · 0 comments · Fixed by #3650
Assignees

Comments

@qarmin
Copy link

qarmin commented Mar 21, 2023

Ruff 33394e4

ruff . --fix

on

from io import SEEK_CUR, SEEK_END, BytesIO, open  # noqa
class KaitaiStruct:
    @classmethod
    def from_file(cls, filename):
        f = open(filename, "rb")

shows

error: Failed to converge after 100 iterations.

This indicates a bug in `ruff`. If you could open an issue at:

    https://github.com/charliermarsh/ruff/issues/new?title=%5BInfinite%20loop%5D

...quoting the contents of `Desktop/RunEveryCommand/Ruff/Broken/848376472PY_FILE_TEST_1124330.py`, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!

Desktop/RunEveryCommand/Ruff/Broken/848376472PY_FILE_TEST_1124330.py:1:51: PGH004 Use specific rule codes when using `noqa`
Desktop/RunEveryCommand/Ruff/Broken/848376472PY_FILE_TEST_1124330.py:2:7: D101 Missing docstring in public class
Desktop/RunEveryCommand/Ruff/Broken/848376472PY_FILE_TEST_1124330.py:4:9: ANN206 Missing return type annotation for classmethod `from_file`
Desktop/RunEveryCommand/Ruff/Broken/848376472PY_FILE_TEST_1124330.py:4:9: D102 Missing docstring in public method
Desktop/RunEveryCommand/Ruff/Broken/848376472PY_FILE_TEST_1124330.py:4:19: ANN102 Missing type annotation for `cls` in classmethod
Desktop/RunEveryCommand/Ruff/Broken/848376472PY_FILE_TEST_1124330.py:4:24: ANN001 Missing type annotation for function argument `filename`
Desktop/RunEveryCommand/Ruff/Broken/848376472PY_FILE_TEST_1124330.py:5:9: UP020 Use builtin `open`
Found 107 errors (100 fixed, 7 remaining).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants