The LSST project will adopt PEP8 as the python coding standard, with the following modifications. Our current python coding standard will be reduced to a link to PEP8 https://www.python.org/dev/peps/pep-0008/
, a list of the items where we differ from PEP8, and the remaining items in our current standard that PEP8 is silent on (some of which-e.g. use of super()-will be revisited in a future RFC).
pep8+flake8+pep8-naming modifications and ignore list:
max-line-length = 110
E133: closing bracket is missing indentation
E226: missing whitespace around arithmetic operator
E228: missing whitespace around bitwise or shift operator
E251: unexpected spaces around keyword / parameter equals
N802: function name should be lowercase
N803: argument name should be lowercase
W391: blank line at end of file
Example flake8 configuration file:
Example SublimeLinter-flakes configuration for SublimeText:
SQuaRE has agreed to support this transition by supplying a flake8 linter configuration (example above), documentation updates, and CI support (further in the future).
For the curious, we took notes in this Google doc to identify the similarities and differences between PEP8 and the LSST python coding standards.