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

unsafe ANN autofix adds -> None to all functions in pyi files #9270

Closed
twoertwein opened this issue Dec 25, 2023 · 1 comment · Fixed by #9277
Closed

unsafe ANN autofix adds -> None to all functions in pyi files #9270

twoertwein opened this issue Dec 25, 2023 · 1 comment · Fixed by #9277
Assignees
Labels
bug Something isn't working

Comments

@twoertwein
Copy link

ruff --select "ANN001,ANN2" --fix-only (version 0.1.9) adds -> None to all functions in pyi files as they have no implementation in the stub files.

xref #9004 (comment)

@charliermarsh
Copy link
Member

Thanks, will fix.

@charliermarsh charliermarsh self-assigned this Dec 25, 2023
@charliermarsh charliermarsh added the bug Something isn't working label Dec 25, 2023
charliermarsh added a commit that referenced this issue Dec 25, 2023
We should avoid adding `-> None` to stubs in `.pyi` files, along with a
few other cases. (We already ignore abstract methods.)

Closes #9270.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants