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
The Python style guides don't have a standard for whether there should be a blank line after a class definition or not. So both of the next cases are valid:
But having both is a bit distracting when reading the code. In pandas-dev/pandas#28209 there has been work in making the first case our standard. But to make sure we don't reintroduce incorrect cases, we should validate in the CI that no cases exists. This can be done by checking in ci/code_checks.sh the regular expression mentioned in the description of the PR. In that file there are several other patterns that we want to avoid.
Before using the grep/regex is probably worth checking that flake8 is not able to check that (we ignore certain errors, may be we are ignoring that one in setup.cfg).
The text was updated successfully, but these errors were encountered:
so I thought to add this portion of code to the ci/code_checks.sh... does it look correct?
# Check for blank lines after the class definition
MSG='Check for extra blank lines after the class definition' ; echo $MSG
invgrep -R --include="*.rst" -E 'class.*:\n\n( )+"""' doc/source/
RET=$(($RET + $?)) ; echo $MSG "DONE"
The include should be for python files, not rst. Other than that looks good. Feel free to open a PR even if you're unsure, not a big deal if there are errors. But it's easier to review, and also see in the CI if it's working as expected.
The Python style guides don't have a standard for whether there should be a blank line after a class definition or not. So both of the next cases are valid:
But having both is a bit distracting when reading the code. In pandas-dev/pandas#28209 there has been work in making the first case our standard. But to make sure we don't reintroduce incorrect cases, we should validate in the CI that no cases exists. This can be done by checking in
ci/code_checks.sh
the regular expression mentioned in the description of the PR. In that file there are several other patterns that we want to avoid.Before using the grep/regex is probably worth checking that
flake8
is not able to check that (we ignore certain errors, may be we are ignoring that one insetup.cfg
).The text was updated successfully, but these errors were encountered: