Repository navigation
chore(ty): enable invalid-argument-type/invalid-assignment for shipped code, drop inert mypy ignores (#507) - #561
Merged
Merged
Conversation
…gnment outside tests (#507) Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…eck resolver tenant ids (#507) Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…skill, READMEs) Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…e_lock/keycloak clean under invalid-argument-type/assignment (#507) Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…eneric signature (#507) Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…nt-type/assignment (#507) Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Deploying simple-module-python with
|
| Latest commit: |
65654b7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://20415800.simple-module-python.pages.dev |
| Branch Preview URL: | https://chore-ty-ignore-507.simple-module-python.pages.dev |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #507
Summary
# type: ignore[<mypy-code>]comments. Under ty 0.0.89 they suppressed nothing (ty matches the bracket against its own rule names) and ty never reported them as unused. Removing them changed no ty output.invalid-argument-typeandinvalid-assignmentare now on for shipped code. Tests, conftest files andscripts/bench_*.pystay exempt through[[tool.ty.overrides]], because they pass fakes on purpose. Enabling the rules surfaced 264 diagnostics outside tests. Each one was fixed, tightened, or given a line-level# ty: ignore[<rule>](148 in total) where it is a known third-party false positive: SQLAlchemyModel.col == xread asbool,selectinload(User.roles), SQLModelmodel_config = ConfigDict(...), fastapi-users generics, and Starlette exception-handler signatures.settings.registration.register_module_settingsis now generic over the settings class.services_factoryreceives the concrete type, so module lambdas need no casts.docs/database/models.mdand the shippedsimple-module-conventionsskill. Inert ignores were also removed from the module README snippets.Behaviour changes (all in CHANGELOG)
UUIDtenant id becomes its string form. Any other non-strtenant id or source raisesTypeErrorinstead of flowing into tenant filters (_tenant.py). Tests are intest_tenant_resolver_types.py.UsersSettings.cookie_samesiteis nowLiteral["lax","strict","none"]and matched case-insensitively, so"Strict"still works. Other values are rejected. A setting typed as aLiteralof strings now renders as a choice list in the settings UI instead of a JSON box.get_file_storage_serviceraises a clearRuntimeErrorwhen the backend is not initialised, instead of building a service aroundNone.groupmetadata on a settings field is shown as no group, andVaryis no longer set toNonewhen there is nothing to merge.include_objecttype:make_include_object's type now includescheck_constraint, matching current Alembic.Test fix
test_lenient_log_never_echoes_the_stored_valuefailed when an earlier test in the same worker left logging at DEBUG:caploghad captured the setup INSERT. The test now clearscaplogbefore hydration.Not changed
smpy newstill ignore both rules globally. This change applies only to this repo's own code.Verification
make lint(ruff, ty, Biome, tsc, file-size, hardcoded and untranslated strings, metadata) passes.make test-pygives 4903 passed and 22 skipped, andmake test-jspasses./shipcode-review loop needed two passes. Pass 1 fixed the settings UI rendering forLiteralfields and a style nit; pass 2 was clean.https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4