* use black as a way of unify the codestyle of the project * use flake8 as a way to identify problems with the code
@@ -0,0 +1,5 @@
+[flake8]
+ignore = E203, E231, E266, E501, W503, F403, F401
+max-line-length = 79
+max-complexity = 18
+select = B,C,E,F,W,T4,B9
@@ -0,0 +1,9 @@
+repos:
+- repo: https://github.com/psf/black
+ rev: stable
+ hooks:
+ - id: black
+- repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v2.3.0
+ - id: flake8
@@ -5,9 +5,12 @@ Kamailio Command Line Interface Control Tool
### Development Guidelines
-#### Indentation
+#### [pre-commit](https://pre-commit.com/)
- * user 4 whitespaces (no tabs) for indentation
+ * apt install build-essentials python3-dev python3-virtualenvwrapper
+ * mkvirtualenv kamcli --python=python3
+ * pip install -r requirements_dev.txt
+ * pre-commit install
#### Used Frameworks
@@ -0,0 +1,10 @@
+[tool.black]
+target-version = ['py37']
+line-length = 79
+include = '\.pyi?$'
+exclude = '''
+/(
+ \.git
+ | \.tox
+)/
+'''
@@ -0,0 +1 @@
+pre-commit