You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
~143 mypy-style # type: ignore[code] comments do nothing under ty; global ty rule disables are broader than documented #507
The repo type-checks with ty. Nothing runs mypy (no references in the Makefile, pyproject or workflows).
There are still about 143 # type: ignore[<mypy code>] comments: arg-type 60, attr-defined 35, call-arg 19, override 6, method-assign 6, and others.
Tested with ty 0.0.89: a bare # type: ignore suppresses the whole line, but a bracketed one is matched against ty's rule names. So # type: ignore[attr-defined] did not suppress an invalid-return-type. ty also doesn't report these comments as unused, so they pile up as noise that misleads readers about what is being hidden.
pyproject.toml:105-118 disables six rules globally. CLAUDE.md lists five; it also disables invalid-assignment.
The global invalid-argument-type disable hides real bugs. Example: _tenant.py:63 passes an unvalidated object as tenant_id into TenantResolution, so a resolver returning a UUID or an int flows into string comparisons. The ignore comment on that line isn't what silences it; the global disable is.
Fix
Delete the mypy-coded ignores. Rewrite the few that are needed as # ty: ignore[<rule>], which ty does report when unused.
Narrow invalid-argument-type and invalid-assignment to per-path overrides, or to warn, instead of global ignore, and fix what turns up in non-ORM code.
Validate or coerce tenant_id to str at the resolver boundary in _tenant.py.
Activity
chore(ty): enable invalid-argument-type/invalid-assignment for shippe…