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

[flake8-pyi] Add autofix for docstring-in-stub (PYI021) #14150

Merged
merged 6 commits into from
Nov 7, 2024

Conversation

InSyncWithFoo
Copy link
Contributor

Summary

Resolves #14123.

Test Plan

cargo nextest run and cargo insta test.

@InSyncWithFoo
Copy link
Contributor Author

The fix does not always result in optimal output, but IIRC these kinds of problems are for the formatter to solve.

 class Foo:
-    """Foo"""  # qux
+      # qux

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

github-actions bot commented Nov 7, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@AlexWaygood AlexWaygood enabled auto-merge (squash) November 7, 2024 11:56
@AlexWaygood AlexWaygood changed the title [flake8-pyi] Remove docstring fix (PYI021) [flake8-pyi] Add autofix for docstring-in-stub (PYI021) Nov 7, 2024
@AlexWaygood AlexWaygood enabled auto-merge (squash) November 7, 2024 11:57
@AlexWaygood AlexWaygood added rule Implementing or modifying a lint rule fixes Related to suggested fixes for violations labels Nov 7, 2024
@AlexWaygood AlexWaygood merged commit b8188b2 into astral-sh:main Nov 7, 2024
18 checks passed
@InSyncWithFoo InSyncWithFoo deleted the PYI021 branch November 7, 2024 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixes Related to suggested fixes for violations rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request: Fix to remove docstrings in stubs (PYI021/docstring-in-stub)
3 participants