mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-08 12:37:44 +00:00
chore: Simplify pre-commit to mandatory hooks only
- Remove optional code quality hooks (black, isort, ruff, mypy, toml-sort) * These blocked commits when tools not installed * Users can run them manually when needed - Keep only MANDATORY hooks: * Integration Tests (60 tests, ~7.5s) * Bandit Security Scan - Both MUST pass before every commit
This commit is contained in:
+16
-45
@@ -2,7 +2,22 @@
|
||||
# See https://pre-commit.com for more information
|
||||
|
||||
repos:
|
||||
# ── Security Scanning (Local) ──────────────────────────────────────
|
||||
# ── Integration Tests (MANDATORY - MUST PASS before commit) ──────
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: integration-tests
|
||||
name: Run Integration Tests (60 tests)
|
||||
entry: pytest
|
||||
language: system
|
||||
args:
|
||||
- test/integration/test_all_features.py
|
||||
- -v
|
||||
- --tb=short
|
||||
- --no-cov # Skip coverage for speed (run separately if needed)
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
|
||||
# ── Security Scanning (MANDATORY) ─────────────────────────────────
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: bandit-security-scan
|
||||
@@ -19,47 +34,3 @@ repos:
|
||||
- --format=txt
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
|
||||
# ── Code Quality (Local - use installed tools) ────────────────────
|
||||
# Note: These hooks only run if the tools are installed
|
||||
# Install with: pip install -e .[lint]
|
||||
- repo: local
|
||||
hooks:
|
||||
# Format Checking
|
||||
- id: black
|
||||
name: black
|
||||
entry: black
|
||||
language: system
|
||||
args: [--line-length, "120"]
|
||||
types: [python]
|
||||
|
||||
- id: isort
|
||||
name: isort
|
||||
entry: isort
|
||||
language: system
|
||||
args: [--profile, black, --line-length, "120"]
|
||||
types: [python]
|
||||
|
||||
- id: ruff
|
||||
name: ruff
|
||||
entry: ruff
|
||||
language: system
|
||||
args: [check, --fix]
|
||||
types: [python]
|
||||
|
||||
# Type Checking
|
||||
- id: mypy
|
||||
name: mypy
|
||||
entry: mypy
|
||||
language: system
|
||||
args: [--config-file=pyproject.toml]
|
||||
types: [python]
|
||||
exclude: ^test/
|
||||
|
||||
# TOML Formatting
|
||||
- id: toml-sort
|
||||
name: toml-sort
|
||||
entry: toml-sort
|
||||
language: system
|
||||
args: [--in-place, --trailing-comma-inline-array]
|
||||
types: [toml]
|
||||
|
||||
Reference in New Issue
Block a user