Configured falke8 for pre-commit
This commit is contained in:
parent
ebc6458948
commit
8b23a0904e
|
|
@ -26,6 +26,7 @@ repos:
|
|||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- id: check-json
|
||||
stages: [manual]
|
||||
- id: mixed-line-ending
|
||||
- id: check-builtin-literals
|
||||
- id: check-merge-conflict
|
||||
|
|
@ -58,11 +59,12 @@ repos:
|
|||
rev: v0.3.1
|
||||
hooks:
|
||||
- id: autoflake8
|
||||
# Flake8 is run outside and here the config doesn't work
|
||||
# - repo: https://github.com/PyCQA/flake8
|
||||
# rev: 3.9.2
|
||||
# hooks:
|
||||
# - id: flake8
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 3.9.2
|
||||
hooks:
|
||||
- id: flake8
|
||||
exclude: ^kibot/mcpyrate/
|
||||
args: [--config, .flake8, --count, --statistics]
|
||||
# Sorting imports is dangerous.
|
||||
# - repo: https://github.com/PyCQA/isort
|
||||
# rev: 5.10.1
|
||||
|
|
|
|||
3
Makefile
3
Makefile
|
|
@ -28,10 +28,9 @@ lint: doc
|
|||
ln -sf src/kibot kibot.py
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
flake8 . --count --statistics
|
||||
pre-commit run -a
|
||||
rm kiplot.py
|
||||
rm kibot.py
|
||||
pre-commit run -a
|
||||
|
||||
test_tmp: lint
|
||||
$(PY_COV) erase
|
||||
|
|
|
|||
10
setup.cfg
10
setup.cfg
|
|
@ -17,16 +17,6 @@ in-place = True
|
|||
recursive = True
|
||||
expand-star-imports = True
|
||||
|
||||
[flake8]
|
||||
ignore = E402, E226, E126, W504
|
||||
max-line-length = 127
|
||||
max-complexity = 21
|
||||
exclude =
|
||||
experiments/kicad/v6/
|
||||
experiments/JLC/
|
||||
kibot/mcpyrate/
|
||||
submodules/
|
||||
|
||||
[codespell]
|
||||
ignore-words-list=kibot,tht
|
||||
quiet-level = 2
|
||||
|
|
|
|||
Loading…
Reference in New Issue