-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[pycodestyle
] Whitespace after decorator (E204
)
#12140
Merged
charliermarsh
merged 12 commits into
astral-sh:main
from
jkauerl:whitespace-after-decorator
Jul 4, 2024
Merged
[pycodestyle
] Whitespace after decorator (E204
)
#12140
charliermarsh
merged 12 commits into
astral-sh:main
from
jkauerl:whitespace-after-decorator
Jul 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jkauerl
changed the title
[pycodestyle] Whitespace after decorator (E204)
[Jul 4, 2024
pycodestyle
] Whitespace after decorator (E204
)
charliermarsh
added
rule
Implementing or modifying a lint rule
preview
Related to preview mode features
labels
Jul 4, 2024
charliermarsh
approved these changes
Jul 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I added a fix too.
charliermarsh
force-pushed
the
whitespace-after-decorator
branch
from
July 4, 2024 23:23
306995a
to
858ea10
Compare
charliermarsh
force-pushed
the
whitespace-after-decorator
branch
from
July 4, 2024 23:26
858ea10
to
0dfec9c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This is the implementation for the new rule of
pycodestyle (E204)
. It follows the guidlines described in the contributing site, and as such it has a new file namedwhitespace_after_decorator.rs
, a new test file calledE204.py
, and as such invokes thefunction
in theAST statement checker
for functions and functions in classes. Linking #2402 because it has all the pycodestyle rules.Test Plan
The file E204.py, has a
decorator
defined called wrapper, and this decorator is used for 2 cases. The first one is when afunction
which has adecorator
is called in the file, and the second one is when there is aclass
and 2methods
are defined for theclass
with adecorator
attached it.Test file:
I am still new to rust and any suggestion is appreciated. Specially with the way im using native ruff utilities.