Skip to content

Validate blank lines after a class definition in pandas #161

Open
@datapythonista

Description

@datapythonista

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:

class Foo:
    """
    Doc.
    """
    pass

class Bar:

    """
    Doc.
    """
    pass

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions