MEP8: PEP8#

Status#

Superseded

Current guidelines for style, including usage of pep8 are maintainedinour pull request guidelines.

We are currently enforcing a sub-set of pep8 on new code contributions.

Branches and Pull requests#

None so far.

Abstract#

The matplotlib codebase predates PEP8, and therefore is less thanconsistent style-wise in some areas. Bringing the codebase intocompliance with PEP8 would go a long way to improving its legibility.

Detailed description#

Some files use four space indentation, some use three. Some usedifferent levels in the same file.

For the most part, class/function/variable naming follows PEP8, but itwouldn't hurt to fix where necessary.

Implementation#

The implementation should be fairly mechanical: running the pep8 toolover the code and fixing where appropriate.

This should be merged in after the 2.0 release, since the changes willlikely make merging any pending pull requests more difficult.

Additionally, and optionally, PEP8 compliance could be tracked by anautomated build system.

Backward compatibility#

Public names of classes and functions that require change (thereshouldn't be many of these) should first be deprecated and thenremoved in the next release cycle.

Alternatives#

PEP8 is a popular standard for Python code style, blessed by thePython core developers, making any alternatives less desirable.