Configured falke8 for pre-commit

This commit is contained in:
Salvador E. Tropea 2022-02-17 12:47:01 -03:00
parent ebc6458948
commit 8b23a0904e
3 changed files with 8 additions and 17 deletions

View File

@ -26,6 +26,7 @@ repos:
- id: end-of-file-fixer - id: end-of-file-fixer
- id: trailing-whitespace - id: trailing-whitespace
- id: check-json - id: check-json
stages: [manual]
- id: mixed-line-ending - id: mixed-line-ending
- id: check-builtin-literals - id: check-builtin-literals
- id: check-merge-conflict - id: check-merge-conflict
@ -58,11 +59,12 @@ repos:
rev: v0.3.1 rev: v0.3.1
hooks: hooks:
- id: autoflake8 - id: autoflake8
# Flake8 is run outside and here the config doesn't work - repo: https://github.com/PyCQA/flake8
# - repo: https://github.com/PyCQA/flake8 rev: 3.9.2
# rev: 3.9.2 hooks:
# hooks: - id: flake8
# - id: flake8 exclude: ^kibot/mcpyrate/
args: [--config, .flake8, --count, --statistics]
# Sorting imports is dangerous. # Sorting imports is dangerous.
# - repo: https://github.com/PyCQA/isort # - repo: https://github.com/PyCQA/isort
# rev: 5.10.1 # rev: 5.10.1

View File

@ -28,10 +28,9 @@ lint: doc
ln -sf src/kibot kibot.py ln -sf src/kibot kibot.py
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --statistics pre-commit run -a
rm kiplot.py rm kiplot.py
rm kibot.py rm kibot.py
pre-commit run -a
test_tmp: lint test_tmp: lint
$(PY_COV) erase $(PY_COV) erase

View File

@ -17,16 +17,6 @@ in-place = True
recursive = True recursive = True
expand-star-imports = 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] [codespell]
ignore-words-list=kibot,tht ignore-words-list=kibot,tht
quiet-level = 2 quiet-level = 2