File: coding-conventions.rst

package info (click to toggle)
pyinstaller 6.13.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 11,520 kB
  • sloc: python: 41,347; ansic: 11,334; makefile: 176; sh: 136; xml: 19
file content (39 lines) | stat: -rw-r--r-- 1,025 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.. _Coding conventions:

Coding conventions
===========================

The PyInstaller project follows the :pep:`8` Style Guide for Python Code for
new code.
It uses yapf_ to do the bulk of the formatting (mostly putting spaces in the
correct places) automatically and flake8_ to validate :pep:`8` rules which yapf_
doesn't cover.

Before submitting changes to PyInstaller, please check your code with both
tools.

To install them run::

    pip install flake8 yapf==0.32.0 toml

Reformat your code automatically with yapf_::

    yapf -rip .

Then manually adjust your code based on any suggestions given by flake8_::

    flake8


Please abstain from reformatting existing code, even it it doesn't follow
PEP 8. We will not accept reformatting changes since they make it harder to
review the changes and to follow changes in the long run. For a complete
rationale please see :issue:`2727`.

.. include:: ../_common_definitions.txt

.. Emacs config:
 Local Variables:
 mode: rst
 ispell-local-dictionary: "american"
 End: