-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ruff 0.3.5 not respecting directive for all lines of a multiline expression #10795
Comments
Hmm... I don't think we respected |
Nevermind, I stand corrected! I'll take a look at what changed... |
Ah ok, the change is that we fixed the ranges on those diagnostics to be on the actual strings. So, previously, they all said line 350:
Now, we have the correct lines and columns:
But now your |
Thanks for the quick reply @charliermarsh! |
It wasn't the intention, but we can support it I think. |
Will be fixed in the next release: #10798. Thanks, and sorry for the disruption. |
## Summary Historically, given: ```python __all__ = [ # noqa: F822 "Bernoulli", "Beta", "Binomial", ] ``` The F822 violations would be attached to the `__all__`, so this `# noqa` would be enforced for _all_ definitions in the list. This changed in #10525 for the better, in that we now use the range of each string. But these `# noqa` directives stopped working. This PR sets the `__all__` as a parent range in the diagnostic, so that these directives are respected once again. Closes #10795. ## Test Plan `cargo test`
Co-authored-by: Ben Zickel <ben@vesttoo.com>
## Summary Historically, given: ```python __all__ = [ # noqa: F822 "Bernoulli", "Beta", "Binomial", ] ``` The F822 violations would be attached to the `__all__`, so this `# noqa` would be enforced for _all_ definitions in the list. This changed in astral-sh#10525 for the better, in that we now use the range of each string. But these `# noqa` directives stopped working. This PR sets the `__all__` as a parent range in the diagnostic, so that these directives are respected once again. Closes astral-sh#10795. ## Test Plan `cargo test`
The bug occurs when switching from ruff 0.3.4 to 0.3.5 with the directive
# noga: F822
not respected for all lines of a multiline expression.The problem is described in this issue in the Pyro repo, mainly:
The command that is executed is
ruff check .
and is part of the CI workflow of the Pyro repo.The text was updated successfully, but these errors were encountered: