# Pre-commit hooks for NordaBiz # Install: pip install pre-commit && pre-commit install # Run manually: pre-commit run --all-files repos: # Python syntax check - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: check-yaml - id: check-json - id: check-added-large-files args: ['--maxkb=500'] - id: trailing-whitespace - id: end-of-file-fixer - id: check-merge-conflict # Python code quality - repo: https://github.com/astral-sh/ruff rev: v0.8.6 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - id: ruff-format # Security checks - repo: https://github.com/PyCQA/bandit rev: 1.8.3 hooks: - id: bandit args: ['-c', 'pyproject.toml', '-r', '.'] additional_dependencies: ['bandit[toml]'] exclude: ^tests/ # Local hooks - quick tests - repo: local hooks: - id: pytest-quick name: Quick pytest check entry: bash -c 'python -m pytest tests/unit/ -x -q --no-cov 2>/dev/null || echo "Tests skipped (run manually)"' language: system pass_filenames: false always_run: true