You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using ruff v0.1.2 and ruff-pre-commit v0.1.2, pre-commit fails with:
ruff.....................................................................Failed
- hook id: ruff
- exit code: 1
error: Failed to converge after 100 iterations.
This indicates a bug in Ruff. If you could open an issue at:
https://github.com/astral-sh/ruff/issues/new?title=%5BInfinite%20loop%5D
...quoting the contents of `my/service/folder/api_v0/router.py`, the rule codes E231, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!my/service/folder/api_v0/router.py:215:106: E231 Missing whitespace after ':'Found 101 errors (100 fixed, 1 remaining).
The code is pretty straightforward:
fromsqlalchemy.ormimportDeclarativeBaseclassBase(DeclarativeBase):
passclassMyClass(Base):
file_uri: Mapped[str] =mapped_column(
String(1024),
nullable=False,
)
...
defmy_function(snapshot: MyClass):
assertsnapshot.file_uriisnotNone, f'Run "{req.run_id}" does not have a snapshot file.'snapshot_path=snapshot.file_uri[len(f's3://{self.s3_bucket_name}/'):]
This is my simplified pyproject.toml, I don't know if it works for everywhere. Interestingly, I need to run Ruff in the directory where the Python file is located to trigger the issue.
E231 and E202 need to be selected at the same time, otherwise the problem does not occur.
## Summary
We were considering the `{` within an f-string to be a left brace, which
caused the "space-after-colon" rule to trigger incorrectly.
Closes#8299.
Using
ruff
v0.1.2 andruff-pre-commit
v0.1.2, pre-commit fails with:The code is pretty straightforward:
Here my
pyproject.toml
settings:It works when I set:
but still, it wants a space between the first and the second length :/
The text was updated successfully, but these errors were encountered: