mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-28 16:34:34 +02:00
chore: add pre-commit hook running ruff and mypy checks on staged files
Mirrors the fast static checks from CI (justfile lint + type-check): ruff check, ruff format --check and mypy (gns3server package only, matching the files = ["gns3server"] scope in pyproject.toml). Only staged Python files are checked; pytest and pip check are left to CI. Enable with: just install-hooks
This commit is contained in:
2 files changed
+59
No files matched your search
@@ -9,6 +9,11 @@ install:
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -e '.[ai-features,dev]'
|
||||
|
||||
# Install the git pre-commit hook (lint + type-check on staged files)
|
||||
[group('dev')]
|
||||
install-hooks:
|
||||
git config core.hooksPath .githooks
|
||||
|
||||
# Apply ruff autofixes for the enforced rules
|
||||
[group('dev')]
|
||||
format:
|
||||
|
||||
Reference in new issue
Block a user