* Requires Python 3.6 or newer
* Changes pep8 max line length to 88 to match black
* Add .editorconfig to match black config
* Update tox to 2.0 to match black recommended version
This patch uses "black" to automatically manage Python style
conventions so that we don't have to. It utilizes pre-commit
to automatically handle running black on commit so that a
contributor does not have to think about it.
This however means that there is a required install step to
initialize a new dev environment using one of 2 options below:
1) Install pre-commit via your pkg manager then run:
pre-commit install
2) Use tox to install pre-commit:
tox -e check-hooks
Change-Id: I527e58b763dc7b0fdfa60fa619c61d2c63356d47
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
known_first_party_imports = lftools
known_third_party_imports = pytest, six, sphinx_bootstrap_theme
pydocstyle_ignore = D203, D213, D301
-max_line_length = 120
+max_line_length = 88
[all.YAML]
bears = YAMLLintBear
--- /dev/null
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+indent_style = space
+
+[*.rst]
+indent_size = 4
+
+[*.py]
+indent_size = 4
+max_line_legth = 88
+
+[*.yaml]
+indent_size = 4
+
hooks:
- id: gitlint
+ - repo: https://github.com/ambv/black
+ rev: stable
+ hooks:
+ - id: black
+ language_version: python3
[tox]
-minversion = 1.9
+minversion = 2.0
envlist =
coala,
docs,