pyproject.toml carried requirements.txt comment lines as dependencies, which fails PEP 508 parsing. flake8 never read [tool.flake8] from pyproject, so the settings move to .flake8 and pre-commit runs the full rule set. config.json (holds the CivitAI API key and machine paths) and other local artifacts are now ignored. coverage joins the dev requirements.
29 lines
665 B
YAML
29 lines
665 B
YAML
repos:
|
|
- repo: local
|
|
hooks:
|
|
- id: black
|
|
name: black
|
|
entry: black --line-length=88 --target-version=py310
|
|
language: system
|
|
types: [python]
|
|
|
|
- id: flake8
|
|
name: flake8
|
|
entry: flake8 --show-source
|
|
language: system
|
|
types: [python]
|
|
|
|
- id: bandit
|
|
name: bandit
|
|
entry: bash -c 'bandit "$@" -ll -q 2>&1; true'
|
|
language: system
|
|
types: [python]
|
|
exclude: ^(tests/|reference/)
|
|
|
|
- id: tests
|
|
name: tests
|
|
entry: python -m unittest discover tests/ -v
|
|
language: system
|
|
pass_filenames: false
|
|
stages: [pre-push]
|