ruff
f2eb7bca - Update ERA100 to apply to commented dictionary items with trailing comments (#6822)

Commit
2 years ago
Update ERA100 to apply to commented dictionary items with trailing comments (#6822) Closes https://github.com/astral-sh/ruff/issues/6821 ERA100 was not raising on commented parts of dictionaries if it included another comment (such as a noqa clause). In cases where this comment was a noqa clause, RUF100 to be emitted since the noqa would have no effect. Here, we update ERA100 to raise even when there are trailing comments. This resolves the linked issue _and_ increases the scope of ERA100. We could narrow the regular expression to only apply to noqa comments if we do not want to expand ERA100 however I think this change is within the spirit of the rule.
Author
Parents
Loading