chore: run ty on tests/ and make the new ingest tests pass it
Stop excluding tests/ from the ty-check pre-commit hook so touched test files are type-checked. Fix the new ingest tests under the now-active check: - cast duck-typed JobContext / App test doubles to their declared types; - narrow the gated Postgres fixture's str | None URL (pytest.skip isn't modelled as NoReturn by ty). Pre-existing type issues in untouched test modules are unaffected (the hook checks only changed files); they'll be cleaned as those files are next touched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
21b7922bac
commit
3407e3cf64
@@ -57,6 +57,8 @@ def postgres_url() -> str:
|
||||
"`docker compose --profile postgres up -d postgres-test` and export "
|
||||
"TEST_DATABASE_URL=postgresql+asyncpg://mcp:mcp@localhost:5433/mcp"
|
||||
)
|
||||
# pytest.skip raises, but ty doesn't model it as NoReturn — narrow explicitly.
|
||||
assert url is not None
|
||||
if not _reachable(url):
|
||||
pytest.skip(f"Postgres at {url} is not reachable")
|
||||
return url
|
||||
|
||||
Reference in New Issue
Block a user