aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornico <nico@magicbroccoli.de>2020-06-27 12:07:09 +0200
committernico <nico@magicbroccoli.de>2020-06-27 12:07:09 +0200
commit8b26b1eb8e5cd8d69e600a4c4eec9bea28ef8059 (patch)
tree0cbf83fb8f5245a9178e98e4a851f38d8261a8f8
parentfa87c166ed68fac05970ae60eda532d6ba5a851a (diff)
tool configuration
* seperate tool config and tool call * rename black stage to code consistency for a greater readability - remove allow_failure from the third stage I did decide to remove the allowed failure tag to encourage a higher code quality.
-rw-r--r--.gitlab-ci.yml17
-rw-r--r--pyproject.toml20
-rw-r--r--setup.cfg5
3 files changed, 33 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c39fb0b..5f1e754 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -16,24 +16,23 @@ before_script:
stages:
- syntax
- - black
- - pep8
+ - code consistency
+ - flake8
syntax:
stage: syntax
script:
- # breaking errors ie syntax errors
+ # flake8 check only breaking errors ie syntax errors
- flake8 --select=E9,F63,F7,F82 --show-source
black:
- stage: black
+ stage: code consistency
script:
# code consistency
- - black . --check --line-length 120
+ - black . --check
pep8:
- stage: pep8
+ stage: flake8
script:
- # pep8 warnings and other non breaking warnings
- - flake8 --max-complexity=10 --max-line-length=120 --show-source
- allow_failure: true
+ # full flake8 test
+ - flake8 --show-source
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..e834e5c
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,20 @@
+[tool.black]
+line-length = 120
+target-version = ['py37', 'py38']
+include = '\.pyi?$'
+exclude = '''
+(
+ /(
+ \.eggs # exclude a few common directories in the
+ | \.git # root of the project
+ | \.hg
+ | \.mypy_cache
+ | \.tox
+ | \.venv
+ | _build
+ | buck-out
+ | build
+ | dist
+ )/ # the root of the project
+)
+'''
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..6e6bed8
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,5 @@
+[flake8]
+ignore = E501
+exclude = .git,__pycache__,.gitlab
+max-complexity = 15
+max-line-length = 120