Skip to content

PEP8: making travis run pep8 on diff instead of comparing the total number of violation to be more robust. #7358

Closed
@has2k1

Description

@has2k1

The objective of this issue is to move the discussion of PEP8 away from PR #7344, and also bring some liberty to contributors that may be affected by what is described below.

Background
The problem is PEP8 (pre-August 2012) was not clear about the spacing around arithmetic operations. The lack of clarity lead to the impression that it was recommended to have a space around all arithmetic operators. This problem was discussed here and the fixed in August 2012. Accordingly, the pep8 the tool became agnostic to no whitespace around arithmetic operators, (PyCQA/pycodestyle#123) -- it allowed for user judgement.

Of-course, through all this many had already been conditioned to write compliant code with adherence to the rigid spacing suggestions of pre-August 2012 PEP8.

Issue
The codebase is full of expressions that largely adhere to the pre-August 2012 PEP8, and many of those expressions are not as clear as they could be. Now, re-writing them for readability is debatable as it would create "git blame" noise. Also, the uniformity of the existing expressions in the codebase cannot serve as a reason for incoming code to adhere a similar form.

The actionable issue raised by @NelleV is that the PEP8 style checks only look for increases in violations.

Solution
Suggested by @NelleV, run flake8 on the diff of the patch. Projects doing this are:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions