Python Code Conventions
Table of Contents
1 Base Reference Conventions
1.1 Google Style
All python code should be written in compliance to the Google Python Style Guide.
1.1.2 Pros
A commonly followed industry standard and well documented.
1.1.3 Cons
Difficult for newer coders and takes time to learn.
2 Base Reference Conventions Modifications/Extended Specifications
2.1 Python Version
All code should be written for a python version of 3.11
at a minimum.
2.1.2 Pros
A commonly followed industry standard and well documented.
2.1.3 Cons
Difficult for newer coders and takes time to learn.
2.1.4 Exceptions
Using an older version of python is allowed only when modifying forks/reusing publicly available code which was originally written in an older version.
2.2 Auto-Formatter
Use the Black formatter for auto formatting.
2.2.1 Pros
Convenient, uncompromising and a commonly followed industry standard.
2.2.2 Cons
Takes time to set up.
2.2.3 Integration
For best IDE integration practices, see your IDE's official documentation and Black's official Editor integration documentation.
- PyCharm by JetBrains: Reformat Python code with Black