-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Python Coding Style
Olivier Michel edited this page Jan 16, 2023
·
3 revisions
When not specified otherwise by our coding style rules, use the PEP 8 standard.
Note: using Atom with the linter-flake8 linter package ensures that we respect our Python coding styles: apm install linter-flake8
.
On VSCode, you can install the PEP8 flake8 linter: settings.json
"python.linting.flake8Enabled": true,
"python.linting.enabled": true,
Line size is limited to 128 characters (instead of 80 in PEP8).
In VSCode, you can add this to your settings.json
:
"python.linting.flake8Args": [
"--max-line-length",
"128"
],
"python.formatting.autopep8Args": [
"--max-line-length",
"128"
],
We don't force PEP257 comments on all functions (especially, simple constructors, getters, setters, etc.) and therefore don't use the flake8-docstrings
Atom package. However, we strongly encourage to respect this rule when it makes sense.