diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91178d0..8435624 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,11 @@ jobs: run: uv run ruff format --check hate_crack - name: Ty - run: uv run ty check hate_crack + # ty 0.0.63 fails CI on warning-level diagnostics by default; + # keep the pre-0.0.63 behaviour of failing only on errors so the + # rules already downgraded to "warn" in [tool.ty.rules] stay + # non-blocking. + run: uv run ty check --exit-zero-on-warning hate_crack - name: Pytest env: diff --git a/prek.toml b/prek.toml index 9ce02d2..d19c5c8 100644 --- a/prek.toml +++ b/prek.toml @@ -22,7 +22,7 @@ always_run = true [[repos.hooks]] id = "ty" name = "ty" -entry = "uv run ty check hate_crack" +entry = "uv run ty check --exit-zero-on-warning hate_crack" language = "system" stages = ["pre-push"] pass_filenames = false diff --git a/pyproject.toml b/pyproject.toml index 2572ef4..0f245e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,6 +87,13 @@ unresolved-import = "warn" # BeautifulSoup union types and module-level globals unresolved-attribute = "warn" invalid-argument-type = "warn" +# ty 0.0.63 tightened these to error for the same legacy pattern +# (module-level `hcatHashFile = None` etc. in main.py, later used as +# strings). Downgrade to warn to match the rest. +unsupported-operator = "warn" +no-matching-overload = "warn" +invalid-assignment = "warn" +unresolved-global = "warn" [tool.pytest.ini_options] testpaths = [ @@ -95,7 +102,7 @@ testpaths = [ [dependency-groups] dev = [ - "ty==0.0.17", + "ty==0.0.63", "ruff==0.15.1", "pytest==9.0.3", "pytest-cov==7.1.0",