Enforce Python codestyle with black

Black is an opinionated tool for auto-formatting Python code so we no
longer have to worry about the codestyle.

For the codestyle decisions and discussion, refer to the upstream
documentation [1].

[1] https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html
This commit is contained in:
Tom Krizek
2022-06-07 16:06:05 +02:00
parent 5d64d05be9
commit 5d2b7cab08
2 changed files with 16 additions and 3 deletions

View File

@@ -855,9 +855,9 @@ name server. However, BIND 9 may use it for its system test
environment, and in some cases for generating source or documentation
files which are then committed to to the git repository.
For Python coding, we abide by the Python style guidelines described
in [PEP8](http://www.python.org/dev/peps/pep-0008/), with a few
modifications:
For Python coding, we enforce a common codestyle using the tool
[black](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html)
There are also a few other requirements:
* The `__init__()` method should always be the first one declared in a
class definition, like so: