diff --git a/.github/renovate.json5 b/.github/renovate.json5 index ae57a97a..05f45c40 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -38,7 +38,7 @@ { matchManagers: ["poetry", "pip_requirements"], matchDepTypes: ["python"], - allowedVersions: "^3.8", + allowedVersions: ">=3.10,<3.14", enabled: true, }, { diff --git a/.gitignore b/.gitignore index b1450d98..85d98b2a 100644 --- a/.gitignore +++ b/.gitignore @@ -156,6 +156,7 @@ venv.bak/ # mkdocs documentation /site +debug.html # mypy .mypy_cache/ diff --git a/.hooks/typing_and_linting.sh b/.hooks/typing_and_linting.sh index 6573b28d..76eb728a 100755 --- a/.hooks/typing_and_linting.sh +++ b/.hooks/typing_and_linting.sh @@ -5,18 +5,18 @@ set -e echo echo "📝 Running type checking with mypy ..." -uv run mypy dreadnode +uv run mypy . echo "✅ Type checking passed!" echo echo "🔎 Running linting with ruff ..." -uv run ruff check dreadnode +uv run ruff check --output-format=github --fix . echo "✅ Linting passed!" echo -echo "🎨 Checking formatting with ruff ..." -uv run ruff format --check dreadnode -echo "✅ Code formatting is correct!" +echo "🎨 Formatting code with ruff ..." +uv run ruff format . +echo "✅ Code formatted!" echo echo "🎉 All checks passed! Code is ready to go." diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5e28effb..f93adfc3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ exclude: "^data/" repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-added-large-files args: [--maxkb=10240] @@ -82,10 +82,10 @@ repos: stages: [post-merge] always_run: true - # Pre-push hook to run typing and linting + # Run typing and linting on every commit - id: typing-and-linting name: Typing and Linting entry: .hooks/typing_and_linting.sh language: script - stages: [pre-push] - always_run: true + types: [python] + pass_filenames: false diff --git a/pyproject.toml b/pyproject.toml index e0b301cc..b494f6ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,7 +110,7 @@ module = [ "dreadnode.scorers.*", "dreadnode.transforms.*", ] -disable_error_code = ["unused-ignore", "import-untyped"] +disable_error_code = ["unused-ignore", "import-untyped", "import-not-found"] [tool.pyright] typeCheckingMode = "off" # we prefer mypy and don't want to deal with small differences