Skip to content
Snippets Groups Projects
Commit 364d1ecb authored by David Trattnig's avatar David Trattnig
Browse files

chore(pre-commit): add hooks and update conf #114

parent 1ba1430b
No related branches found
No related tags found
No related merge requests found
[codespell]
exclude-file = .gitignore
skip = ./src/aura_engine/client/playerclient.py,*.log,.git,*.png,*.db
count =
quiet-level = 1
\ No newline at end of file
......@@ -2,6 +2,5 @@
max-line-length = 99
max-doc-length = 99
docstring-convention=google
exclude = python, tests/*, __init__.py, src/aura_engine/client/*, meta.py
ignore = E121,E123,E126,E203,E226,E24,E704,W503,N802,\
D105,D107,D200,D202
exclude = python, tests/*, __init__.py, src/aura_engine/client/*
ignore = E121,E123,E126,E203,E226,E24,E704,W503,N802,D105,D107,D200,D202,D212,D417
repos:
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/codespell-project/codespell
rev: "v2.1.0"
hooks:
- id: codespell
args: [""]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.2
hooks:
- id: flake8
args: ["--config=.flake8"]
additional_dependencies: [
"flake8-docstrings"
]
\ No newline at end of file
......@@ -3,7 +3,8 @@
help::
@echo "$(APP_NAME) targets:"
@echo " init.app - init application environment"
@echo " init.app.sys - init application environment (sudo)"
@echo " init.dev.sys - init development environment (sudo)"
@echo " init.dev - init development environment"
@echo " lint - verify code style"
@echo " spell - check spelling of text"
......@@ -62,7 +63,7 @@ DOCKER_RUN = @docker run \
# Targets
init.app::
init.app.sys::
apt install -y \
python3-wheel \
python3-flask \
......@@ -72,23 +73,26 @@ init.app::
python3-requests \
python3-sqlalchemy
init.dev::
apt install -y
init.dev.sys::
apt install -y \
codespell \
black \
pre-commit \
python3-flake8 \
python3-flake8-docstrings \
python3-validators \
python3-isort
init.dev:: requirements.txt
pip install --user -Ur requirements.txt
pre-commit autoupdate
pre-commit install
lint::
python3 -m flake8 .
spell:: SPELL_PATHS := $(wildcard *.md) docs src tests config contrib
spell:: SPELL_PATHS_SKIP := src/aura_engine/client/playerclient.py
spell:: SPELL_IGNORE_FILE := .codespellignore
spell::
codespell --ignore-words "$(SPELL_IGNORE_FILE)" --skip "$(SPELL_PATHS_SKIP)" $(SPELL_PATHS)
codespell
style::
python3 -m isort .
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment