chore: point ty at the api venv #11

Merged
jalenluorion merged 1 commit from chore/ty-api-venv into main 2026-09-29 00:26:51 +00:00
Member

ty runs from the repository root, where there is no pyproject.toml or
venv, so every third-party import in api/ was unresolved. This adds a
root ty.toml with environment.python = "api/.venv" and
environment.root = ["api"]. The explicit setting also wins over the
devenv shell's VIRTUAL_ENV.

With ty 0.0.73 (the nixpkgs pin) after cd api && uv sync --extra dev:
210 diagnostics before, 108 after. What is left is genuine:

  • invalid-argument-type 34
  • unresolved-attribute 28 (mostly Optional values used unchecked)
  • invalid-parameter-default 21 (x: T = None, same as RUF013)
  • unsupported-operator 7
  • invalid-return-type 6
  • invalid-assignment 4
  • deprecated (warning) 4
  • unresolved-import 3 (scraper/main.py script-style imports and a
    missing SIScraper export)
  • missing-argument 1

That is too many to fix here, so the hook stays disabled and its comment
in devenv.nix now describes what is left. Turning it on also needs
api/.venv in the devenv shell, since the shared module only runs uv sync
for a root pyproject.toml.

Deferred ruff groups, counts only (ruff 0.16.3): UP 214, BLE001 68,
DTZ 48, RUF013 21. The configured rule set is clean.

Generated with Claude Code

ty runs from the repository root, where there is no pyproject.toml or venv, so every third-party import in api/ was unresolved. This adds a root ty.toml with `environment.python = "api/.venv"` and `environment.root = ["api"]`. The explicit setting also wins over the devenv shell's VIRTUAL_ENV. With ty 0.0.73 (the nixpkgs pin) after `cd api && uv sync --extra dev`: 210 diagnostics before, 108 after. What is left is genuine: - invalid-argument-type 34 - unresolved-attribute 28 (mostly Optional values used unchecked) - invalid-parameter-default 21 (`x: T = None`, same as RUF013) - unsupported-operator 7 - invalid-return-type 6 - invalid-assignment 4 - deprecated (warning) 4 - unresolved-import 3 (scraper/main.py script-style imports and a missing SIScraper export) - missing-argument 1 That is too many to fix here, so the hook stays disabled and its comment in devenv.nix now describes what is left. Turning it on also needs api/.venv in the devenv shell, since the shared module only runs uv sync for a root pyproject.toml. Deferred ruff groups, counts only (ruff 0.16.3): UP 214, BLE001 68, DTZ 48, RUF013 21. The configured rule set is clean. Generated with [Claude Code](https://claude.com/claude-code)
chore: point ty at the api venv
Some checks failed
kennel/build build succeeded
CI / check (pull_request) Has been cancelled
CI / check-1 (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
358b72e64d
ty runs from the repository root, where there is no pyproject.toml or
venv, so every third-party import in api/ was unresolved (121 of the 210
diagnostics). A root ty.toml now sets the environment to api/.venv and
the first-party root to api/.

That leaves 108 genuine diagnostics, too many to fix alongside a config
change, so the hook stays disabled and its comment now says what is left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jalenluorion force-pushed chore/ty-api-venv from 358b72e64d
Some checks failed
kennel/build build succeeded
CI / check (pull_request) Has been cancelled
CI / check-1 (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
to 7b933b54f4
All checks were successful
kennel/build build succeeded
CI / check-1 (pull_request) Successful in 10m16s
CI / build (pull_request) Successful in 20m47s
CI / check (pull_request) Successful in 0s
2026-09-29 00:03:31 +00:00
Compare
jalenluorion deleted branch chore/ty-api-venv 2026-09-29 00:26:51 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/cal!11
No description provided.