mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-07-28 14:47:22 -07:00
build: unblock ty 0.0.63 dep bump
ty 0.0.63 changed two things that broke CI on this bump: - new rules (unsupported-operator, no-matching-overload, invalid-assignment, unresolved-global) are error-severity by default and fire on the same legacy module-globals pattern in hate_crack/main.py the existing "warn" rules were pinned for; downgrade them to match. - default exit behaviour now fails on warning-level diagnostics; pass --exit-zero-on-warning to ty check in CI and in the pre-push prek hook to restore the prior fail-only-on-errors semantics. No source changes; deferring the main.py globals refactor. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
3ac759fb84
commit
f3b6e04a3b
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user