-
Notifications
You must be signed in to change notification settings - Fork 188
fix(checker): allow whitespace before inner functions and class #426
fix(checker): allow whitespace before inner functions and class #426
Conversation
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.
I just thought, there is the case of decorators around classes/functions, so that regex and test file could use @
cases.
For example it's fairly common to write a decorator that uses functions.wraps(...)
Avoid DeprecationWarning ("invalid escape sequence").
I updated the PR and also added a commit to fix some |
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.
Great!
I just stumbled upon this PR. Is there anything that I can do to help it along or is it ready to merge? |
@ColinKennedy we're just waiting for a review by a project member. |
Sorry for the long delays in response - I've been on back-to-back family vacation and business trips. I'll to catch up as soon as I can. |
Fix: PyCQA/pydocstyle#426 [noissue]
This is required as PyCQA/pydocstyle#426 does not fix the issue for async def'd inner functions.
This is required as PyCQA/pydocstyle#426 does not fix the issue for async def'd inner functions.
See psf/black#709 and PyCQA/pydocstyle#426 pydocstyle v5.0.0 (and thus flake8 D202) was relaxed to accept the blank lines added by black.
Once upon a time black and pydocstyle disagreed on blank lines before nested functions, and a comment would appease them both. Since then, the latter has been changed to not complain about a blank line (PyCQA/pydocstyle#426), and the former now complains about the missing blank line even with the comment (psf/black#3302).
Once upon a time black and pydocstyle disagreed on blank lines before nested functions, and a comment would appease them both. Since then, the latter has been changed to not complain about a blank line (PyCQA/pydocstyle#426), and the former now complains about the missing blank line even with the comment (psf/black#3302).
Once upon a time black and pydocstyle disagreed on blank lines before nested functions, and a comment would appease them both. Since then, the latter has been changed to not complain about a blank line (PyCQA/pydocstyle#426), and the former now complains about the missing blank line even with the comment (psf/black#3302).
Once upon a time black and pydocstyle disagreed on blank lines before nested functions, and a comment would appease them both. Since then, the latter has been changed to not complain about a blank line (PyCQA/pydocstyle#426), and the former now complains about the missing blank line even with the comment (psf/black#3302).
Changes D202: ("No blank lines allowed after function docstring") to
allow space below function docstrings with inner functions.
i.e. allows:
See comment from @cdeil in #361.
This is a follow-up of PR #395.
If you've added an error code or changed an error code behavior,
you should probably add or change a test case file under
tests/test_cases/
and addit to the list under
tests/test_definitions.py
.If you've added or changed a command line option,
you should probably add or change a test in
tests/test_integration.py
.Make sure to include the PR number after you open and get one.