From patchwork Thu Oct 13 09:37:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 58806 From: mliska@suse.cz (=?utf-8?q?Martin_Li=C5=A1ka?=) Date: Thu, 13 Oct 2022 11:37:47 +0200 Subject: [DOCS] Python Language Conventions Message-ID: I think we should add how Python scripts should be formatted. I noticed that while reading the Modula-2 patchset where it follows the C/C++ style when it comes to Python files. Ready to be installed? Thanks, Martin --- htdocs/codingconventions.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/htdocs/codingconventions.html b/htdocs/codingconventions.html index e4d30510..180ef35a 100644 --- a/htdocs/codingconventions.html +++ b/htdocs/codingconventions.html @@ -80,6 +80,7 @@ the conventions separately from any other changes to the code.

+
  • Python Language Conventions @@ -1483,6 +1484,19 @@ with a right brace, optional closing comment, and a new line. Definitions within the body of a namespace are not indented.

    +

    Python Language Conventions

    + +

    +Python scripts should follow PEP 8 ? Style Guide for Python Code +which can be verified by flake8 tool. +We do also recommend using the following flake8 plug-ins: + +

      +
    • flake8-builtins
    • +
    • flake8-import-order
    • +
    • flake8-quotes
    • +
    +