Python Guidelines

How to Start

Learning Resources

Setup

  • If you use OSX, follow this guide

  • If you use a Linux based distribution, you can follow the steps in this page

  • Lastly, if you use Windows you can download an installer from the officialdownloads page.

Coding Style

Rules

  • Use 4 spaces for indentation.

  • Please conform to the indentation style dictated in the .editorconfig file. We recommend using a text editor with EditorConfig support to avoid indentation and whitespace issues.

  • Follow PEP8.

  • In docstrings, follow PEP 257.

Linting

  • flake8

  • Recommended flake8 extensions: - flake8-mutable (Mutable default parameters in function definitions) - flake8-pep3101 (String formatting) - flake8-print (printcalls) - flake8-quotes (Enforce single quotes) - flake8-debugger (pdb/ipdb traces)

  • pylint

IDEs

Resources

References