mirror of
https://github.com/usestrix/strix.git
synced 2026-08-24 20:02:39 +02:00
Integration fixes the merge required: - guard tools after the strict-schema downgrade, so the copy dataclasses.replace returns is the object the safety wrapper mutates - await _ctx_client, which main made async for the Caido bootstrap handle - pass main's extra_files through with the isolated local sources - keep DEFAULT_SAFETY_MODE alongside main's new report/state imports - rebuild the committed viewer bundle from the merged frontend sources - pin the browser-session safety phrase in test_safety_prompt so it no longer matches unrelated prompt text, and stamp safety_mode on the workspace-file resume record
71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
repos:
|
|
# Ruff for fast linting and formatting
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.11.13
|
|
hooks:
|
|
- id: ruff
|
|
args: [--fix, --exit-non-zero-on-fix]
|
|
name: ruff-lint
|
|
- id: ruff-format
|
|
name: ruff-format
|
|
|
|
# MyPy for static type checking
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: v1.17.1
|
|
hooks:
|
|
- id: mypy
|
|
additional_dependencies: [
|
|
types-requests,
|
|
types-python-dateutil,
|
|
pydantic,
|
|
fastapi,
|
|
pytest,
|
|
hatchling,
|
|
"openai-agents[litellm]>=0.19.0,<0.20",
|
|
]
|
|
args: [--install-types, --non-interactive]
|
|
|
|
# Built-in hooks for basic file checks
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v5.0.0
|
|
hooks:
|
|
# The committed viewer bundle is build output: rewriting its bytes would
|
|
# change shipped minified code.
|
|
- id: trailing-whitespace
|
|
exclude: ^strix/interface/viewer/static/
|
|
- id: end-of-file-fixer
|
|
exclude: ^strix/interface/viewer/static/
|
|
- id: check-toml
|
|
- id: check-merge-conflict
|
|
- id: check-added-large-files
|
|
args: ['--maxkb=1024']
|
|
- id: debug-statements
|
|
- id: check-case-conflict
|
|
- id: check-docstring-first
|
|
|
|
# Security checks with bandit
|
|
- repo: https://github.com/PyCQA/bandit
|
|
rev: 1.8.3
|
|
hooks:
|
|
- id: bandit
|
|
args: [-c, pyproject.toml]
|
|
|
|
# Additional Python code quality checks
|
|
- repo: https://github.com/asottile/pyupgrade
|
|
rev: v3.21.2
|
|
hooks:
|
|
- id: pyupgrade
|
|
args: [--py312-plus]
|
|
|
|
ci:
|
|
autofix_commit_msg: |
|
|
[pre-commit.ci] auto fixes from pre-commit.com hooks
|
|
|
|
for more information, see https://pre-commit.ci
|
|
autofix_prs: true
|
|
autoupdate_branch: ""
|
|
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
|
|
autoupdate_schedule: weekly
|
|
skip: []
|
|
submodules: false
|