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
No thanks, this issue is sufficient. I need to look into the relationship between a few related rules here. (We also may need to remove the autofix here, it seems like it's going to be wrong most of the time.)
## Summary
This PR modifies a few of our rules related to which statements (and how
many) are allowed in function bodies within `.pyi` files, to improve
compatibility with flake8-pyi and improve the interplay dynamics between
them. Each change fixes a deviation from flake8-pyi:
- We now always trigger the multi-statement rule (PYI048) regardless of
whether one of the statements is a docstring.
- We no longer trigger the `...` rule (PYI010) if the single statement
is a docstring or a `pass` (since those are covered by other rules).
- We no longer trigger the `...` rule (PYI010) if the function body
contains multiple statements (since that's covered by PYI048).
Closes#7021.
## Test Plan
`cargo test`
Hello,
I've noticed PYI010's autofix replaces function stubs' docstrings with ellipsis regardless of if there is one already or not.
Minimal code snippet
Details
The commands I invoked:
ruff . --fix
ruff . --fix --isolated --select "PYI"
(got aerror: Failed to converge after 100 iterations.
with this one;will create a new issue soon)The current Ruff version: 0.0.286
The current Ruff settings
# "PYI010"
in unfixable after the first command; no sure if it's relevant.Thanks for the linter, btw; it's really awesome!
The text was updated successfully, but these errors were encountered: