From d906d26efe55db2f53ac3edf328bf7f646a5cc38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2026 16:18:39 +0000 Subject: [PATCH 1/3] chore(deps-dev): bump ty from 0.0.90 to 0.0.100 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.90 to 0.0.100. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.90...0.0.100) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.97 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- uv.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/uv.lock b/uv.lock index c56d593f..e349dda3 100644 --- a/uv.lock +++ b/uv.lock @@ -3850,27 +3850,27 @@ wheels = [ [[package]] name = "ty" -version = "0.0.90" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/68/b1/613b5534624442a9118828d7a9e54d50b16f0f5c8b67c80eb6623f33b921/ty-0.0.90.tar.gz", hash = "sha256:25cef63ec07a0254c2f5d885a63b001d0bfa437b20caa0a408f4f52e66b133e7", size = 7996206, upload-time = "2026-10-20T14:25:19.477Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b2/33/0e3395afa2c31c0e8e91547629858d2a5de213c69af237e6e50f37545565/ty-0.0.90-py3-none-linux_armv6l.whl", hash = "sha256:0dedb54977b40bc86638fec2c90eefd593f3a6683003a86b7e6cb67c17bcc476", size = 14281945, upload-time = "2026-10-20T14:24:21.018Z" }, - { url = "https://files.pythonhosted.org/packages/d7/fd/5d632b2f88d5c18991a4936da8643c7f204cfbc4980f8c7cd9080af988ad/ty-0.0.90-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:3d7c30ceaac76dfbfcf36b72d36272d21c3898e98fc4de296aa9cbae956dec9d", size = 13786355, upload-time = "2026-10-20T14:24:24.392Z" }, - { url = "https://files.pythonhosted.org/packages/79/08/0d2f37bb4f766ab9630f01b07f4d11f1f7a6a6188f920d5ca9fa8a4676b1/ty-0.0.90-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c0b7e4d9ae0939294f0a18652de9ad7d81da2d7f567cf93f1edda1263008c124", size = 12856535, upload-time = "2026-10-20T14:24:27.386Z" }, - { url = "https://files.pythonhosted.org/packages/e4/77/70658f6b80c345ae0c12f2192a5cc89b8ca13eccfe06616b0fac3806c261/ty-0.0.90-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76c4a095a86a132df374e652894fe08392aeb1601d6347e1eb4b58808094a302", size = 13696342, upload-time = "2026-10-20T14:24:30.413Z" }, - { url = "https://files.pythonhosted.org/packages/b9/3e/693049f93653d2f6412bb0c2c0af1d01675e31643af29bef7177d3ff7e79/ty-0.0.90-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4e24a8aa07c05d9d14648289e79a88b7c7c2c522c58b53bb5f466a6ba4704e22", size = 14014180, upload-time = "2026-10-20T14:24:33.783Z" }, - { url = "https://files.pythonhosted.org/packages/27/08/19e373f97501eaadc8fc42e8c07cd54a64e375fbcf1470797be13590d5ba/ty-0.0.90-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40c3ea8fc1dfcf7502f71b93b12e80da1f7a8a5fd7e55ec9feabcf4ac39f72ea", size = 14935189, upload-time = "2026-10-20T14:24:37.459Z" }, - { url = "https://files.pythonhosted.org/packages/33/54/3331984f2c896a7383b6b18c86e968a63dd046baf503119a8e8e7682c752/ty-0.0.90-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1af75532bbe3e305089c30806fa5e804f8b01de231c1fa07918f7f3b335626da", size = 15311482, upload-time = "2026-10-20T14:24:40.87Z" }, - { url = "https://files.pythonhosted.org/packages/bf/f3/179acf8d730c2c864767ffcc9081f5ea6fdb1b34ef711f1bd226200e9cff/ty-0.0.90-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f09449b34d837a044dab043aeb2b4b6ff2d2cef5eaf8116c7c19d34cc2a16a21", size = 15278844, upload-time = "2026-10-20T14:24:44.539Z" }, - { url = "https://files.pythonhosted.org/packages/71/7e/661bc2fa20e0ac84c4d5f92e4c098ec667a0e920851a6d10c10a0251f0dc/ty-0.0.90-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc868ffa7dfcb3169eea3ba7d634e5a3283c7133fb932c6e47a2e16620d26ca5", size = 14558774, upload-time = "2026-10-20T14:24:47.814Z" }, - { url = "https://files.pythonhosted.org/packages/f4/2e/3f65f61f4545f75255373be7646a606e004bb4cdc851e236bf17ca94bdc2/ty-0.0.90-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:e2405206533dc896a2b711e781f2955d5883d85536f4df0ac262fca6517103c2", size = 14788158, upload-time = "2026-10-20T14:24:51.223Z" }, - { url = "https://files.pythonhosted.org/packages/1e/10/3c91a529591667b89d63c86806bfe2ac56d6989c7e0a09ee0964b7512deb/ty-0.0.90-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:0dca4a29e8778285d2fc204af19254571486106fd14aed60769bfd272c795f6f", size = 13687177, upload-time = "2026-10-20T14:24:54.611Z" }, - { url = "https://files.pythonhosted.org/packages/21/b2/1b6d48606c67614bfb0c8e61a5d67a053ca1e3c5956ddb584f8569b8dc3d/ty-0.0.90-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d004b8e4e898fead929eceea669b73936444671748e0dd44e624cc109346c0dd", size = 14027780, upload-time = "2026-10-20T14:24:59.045Z" }, - { url = "https://files.pythonhosted.org/packages/4f/c4/a0771debf725312524ca1434f8a146d37e573d45257ca4bebb9cc8e35bbc/ty-0.0.90-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a6be182da4281b4581c4a1b27c6a0caebeed7212e4bdc98c6b8fe0d9bc36dea0", size = 14355890, upload-time = "2026-10-20T14:25:03.034Z" }, - { url = "https://files.pythonhosted.org/packages/a7/4c/036724b6936ffc38e28ff5e20ab7972d609c65a3dd9645f3d10f57cfd16f/ty-0.0.90-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:0ba6fe0a24ff4cbc5034f3aa1c88b3ad1397315dd3369357e694fd157a11864e", size = 14692306, upload-time = "2026-10-20T14:25:07.461Z" }, - { url = "https://files.pythonhosted.org/packages/a8/2a/c74fd5fc3fb5b046fe06a9067cabf5417b73e28249dc9af90ef72700f8fd/ty-0.0.90-py3-none-win32.whl", hash = "sha256:4c46a79caf84c4da0f7293e16bd769bd467c7cbc38015cac7608ab4e5ec8ba9c", size = 13235434, upload-time = "2026-10-20T14:25:10.545Z" }, - { url = "https://files.pythonhosted.org/packages/d2/54/be5cd6b17d8087a5e4c26892311c07e39d42b66c925b0f06cfc51a9ce83b/ty-0.0.90-py3-none-win_amd64.whl", hash = "sha256:8d77c16d20201b7a07ccaafb610eaf60488783dbba9865c4f9182e584f1426f8", size = 13855668, upload-time = "2026-10-20T14:25:13.648Z" }, - { url = "https://files.pythonhosted.org/packages/33/68/6dea089a897e8b314504eecc2633de3c8fe14f70e71a35606d14a2ba169e/ty-0.0.90-py3-none-win_arm64.whl", hash = "sha256:bfb63e74eeedb0a29d49cf58d611c540bfdfc0975dfce26efc6575bcf439208d", size = 13330853, upload-time = "2026-10-20T14:25:16.642Z" }, +version = "0.0.100" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2a/b4/ac430b910566e28b1cd01faf7ee07ca38bcd7585b30fce8fd25dfc104edc/ty-0.0.100.tar.gz", hash = "sha256:ca75081ead663c077e40b90c38b6e9f039b6d168051e02918a8a1d7ecc4fa0dd", size = 8238916, upload-time = "2026-11-09T20:16:27.534Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/05/54/524bdb4f8d3afa86296beb3e3f431301547b7aa3ce9ae839cff6265148aa/ty-0.0.100-py3-none-linux_armv6l.whl", hash = "sha256:f6059a1429f8f4147a93d601acb1c792fe8b88d3b41391a336ade557228b09cf", size = 14880599, upload-time = "2026-11-09T20:15:41.667Z" }, + { url = "https://files.pythonhosted.org/packages/c5/a1/9bb8d1c79d46257289299d42c5e1719527eb99624bd1ce07ebb775f78e6a/ty-0.0.100-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:de874a1cef7bc54b2f162a82e3f8a066c6356204df0f44e31c4f84e0a0f46fdc", size = 14482351, upload-time = "2026-11-09T20:15:44.801Z" }, + { url = "https://files.pythonhosted.org/packages/57/3f/7a6790546398fdf4d2dcd2c496a9f229c018f9a72f8e95120432ee85609c/ty-0.0.100-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c45a02b8d11675f009124ee082b070204e5c57721acb3b44b0567721db3710d5", size = 13437855, upload-time = "2026-11-09T20:15:47.498Z" }, + { url = "https://files.pythonhosted.org/packages/4b/45/ad4c8b88eacdb0e09590dbb90ca15b3eeebdaf91bfbfae265a00cad6608c/ty-0.0.100-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e85f94c680722635e07e24949faf2c52b62139e721ba724981801ac47ab6e67", size = 14317038, upload-time = "2026-11-09T20:15:49.849Z" }, + { url = "https://files.pythonhosted.org/packages/ba/30/84f624735db9b001ce24ca4459af2a66e7fbcb7f62d18ad59ac15ac63879/ty-0.0.100-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:81678a99b4eb1a62e887f9315923aa6438ddf3f78dfa02bc26f441f1d31a5879", size = 14610161, upload-time = "2026-11-09T20:15:52.337Z" }, + { url = "https://files.pythonhosted.org/packages/d5/9c/13c5830c75d1cf448b601404c043dbefcc37eb6d042d97eed40c2c525f8e/ty-0.0.100-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b684eab7e3d61de3a929416e38e9eb8ef1d6442feb13f0b94bc8e72e483763c", size = 15602690, upload-time = "2026-11-09T20:15:54.889Z" }, + { url = "https://files.pythonhosted.org/packages/9e/9f/1f480d1b731e04c6e55b2c413b18f4c209d001a3ce8f9a508791197b5ef2/ty-0.0.100-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fddaddb71dd6019e5e32f9faa690a9851ec345ba8a59c02c82966bac4eee9afe", size = 16011216, upload-time = "2026-11-09T20:15:57.835Z" }, + { url = "https://files.pythonhosted.org/packages/f8/1d/5ebd4b372e28b493b82f7ff1bf612753334080896a4ac0ee0c7b9a13ffd0/ty-0.0.100-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:50f7ae81ff38eab05f13fdb2caccce9ebded08dbef0e4c680a23e91aae0bda6a", size = 15925281, upload-time = "2026-11-09T20:16:01.275Z" }, + { url = "https://files.pythonhosted.org/packages/b8/56/02b46b2a5f78f6edbd29afde54fce4461dd6462f901974deac0c9c1a987b/ty-0.0.100-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e23076fd67dc5c740a5cd292f3bbc10b82127dd01df3cb559e12b3144ceef72d", size = 16749475, upload-time = "2026-11-09T20:16:05.195Z" }, + { url = "https://files.pythonhosted.org/packages/22/56/fe9dd55573e9e65d6ed4bedbce97a3a1bab3fcc33f20f09f89c4abc462c1/ty-0.0.100-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a1006c1a8eff26bbbbc7e909ec43284e61478a3ac3aa1d7cf0c23120a4a2ac48", size = 15466325, upload-time = "2026-11-09T20:16:07.816Z" }, + { url = "https://files.pythonhosted.org/packages/a6/55/d518f662e8556a438bc4653eefc07256f93c6d71b23012f7c44e30b7f48f/ty-0.0.100-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:fae832c5da4da1a1dc1952f0dc9b3655f2b2266c27b6d0c87b40d02cd1b02601", size = 14330127, upload-time = "2026-11-09T20:16:10.386Z" }, + { url = "https://files.pythonhosted.org/packages/3c/da/a871955054a9eb80635d6d46c8b1f49430bc74cd6e21152428109aefac0c/ty-0.0.100-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:f1a486d914fcb858bc02818f2684db3609207c8ab261256657bfe0fa51544855", size = 14622284, upload-time = "2026-11-09T20:16:13.044Z" }, + { url = "https://files.pythonhosted.org/packages/ec/b1/d5a64e177271dde1069bff2ef3294be48cb7590c690bccdc2189018a0775/ty-0.0.100-py3-none-musllinux_1_2_i686.whl", hash = "sha256:e70709927d0e926b96590a8a42fbfef01e9c30a70171e9f1ea18403b5b3aca8a", size = 14994667, upload-time = "2026-11-09T20:16:15.344Z" }, + { url = "https://files.pythonhosted.org/packages/71/0a/619e73420ad849974e9b0b52b12047455f13168682603919dbe2f1d7d9a9/ty-0.0.100-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:51926133e69153748ca27e9079802baf8cdda7170ec40eea037752117754cb32", size = 15377827, upload-time = "2026-11-09T20:16:17.806Z" }, + { url = "https://files.pythonhosted.org/packages/2f/1b/c845fcda0d2549c4d7b6023dde2cbac8a108253e3fe7ceae02b2e1f58fab/ty-0.0.100-py3-none-win32.whl", hash = "sha256:6eeb12edfb3608427aa657983b1ddad1d0c73915752d092bfe5c35315804b071", size = 13789591, upload-time = "2026-11-09T20:16:20.28Z" }, + { url = "https://files.pythonhosted.org/packages/3b/35/2becc700b2384a2d0b373626ed59c6706d2089888a14721199dba1aa3094/ty-0.0.100-py3-none-win_amd64.whl", hash = "sha256:01c230d3046f0d5e8ab6e1def4131aab21659a1d290cc88b39b4fde04bfad0c0", size = 14440120, upload-time = "2026-11-09T20:16:22.858Z" }, + { url = "https://files.pythonhosted.org/packages/5f/d5/5c46cefc47f3c18c09caf5a370eb9a70945d9f86fd79ac6e0a5e40180fe4/ty-0.0.100-py3-none-win_arm64.whl", hash = "sha256:e5ef15fae8544582d03c78b5287abd18eac78e5f21dff80b5febb2e038e97205", size = 13909648, upload-time = "2026-11-09T20:16:25.274Z" }, ] [[package]] From 7c2f0dc0014e091568b1561ffbaeb23577968a9e Mon Sep 17 00:00:00 2001 From: Anto Subash Date: Fri, 13 Nov 2026 17:18:39 +0100 Subject: [PATCH 2/3] fix: adapt annotations to ty 0.0.99 --- framework/core/simple_module_core/deprecation.py | 2 +- framework/hosting/simple_module_hosting/_openapi.py | 2 +- framework/hosting/simple_module_hosting/_route_guard.py | 2 +- .../core/settings/test_background_tasks_config_guards.py | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/framework/core/simple_module_core/deprecation.py b/framework/core/simple_module_core/deprecation.py index 89829c09..ef1904f9 100644 --- a/framework/core/simple_module_core/deprecation.py +++ b/framework/core/simple_module_core/deprecation.py @@ -75,7 +75,7 @@ def init(self: Any, *args: Any, **kwargs: Any) -> None: entry.warn(stacklevel=2) original_init(self, *args, **kwargs) - obj.__init__ = init # ty: ignore[invalid-assignment] + obj.__init__ = init return obj @functools.wraps(cast("Callable[..., Any]", obj)) diff --git a/framework/hosting/simple_module_hosting/_openapi.py b/framework/hosting/simple_module_hosting/_openapi.py index 4010dc5b..59d6573d 100644 --- a/framework/hosting/simple_module_hosting/_openapi.py +++ b/framework/hosting/simple_module_hosting/_openapi.py @@ -142,4 +142,4 @@ def openapi() -> dict: assert app.openapi_schema is not None return app.openapi_schema - app.openapi = openapi # ty: ignore[invalid-assignment] + app.openapi = openapi diff --git a/framework/hosting/simple_module_hosting/_route_guard.py b/framework/hosting/simple_module_hosting/_route_guard.py index 41f0e5bc..3283b7e3 100644 --- a/framework/hosting/simple_module_hosting/_route_guard.py +++ b/framework/hosting/simple_module_hosting/_route_guard.py @@ -96,7 +96,7 @@ def guard_included_routers(app: FastAPI, *, warm: bool = True) -> None: if isinstance(route, _IncludedRouter) and not isinstance(route.matches, _PrefixGuard): guard = _PrefixGuard(route) guard._current_prefix() - route.matches = guard # ty: ignore[invalid-assignment] + route.matches = guard if warm: for _ in route.effective_route_contexts(): pass diff --git a/modules/background_tasks/tests/core/settings/test_background_tasks_config_guards.py b/modules/background_tasks/tests/core/settings/test_background_tasks_config_guards.py index cb04b2ef..432d543c 100644 --- a/modules/background_tasks/tests/core/settings/test_background_tasks_config_guards.py +++ b/modules/background_tasks/tests/core/settings/test_background_tasks_config_guards.py @@ -64,7 +64,9 @@ def test_env_overrides_bad_json_or_shape_is_ignored(monkeypatch, caplog) -> None def test_celery_overrides_is_not_a_db_backed_setting(monkeypatch) -> None: assert "celery_overrides" not in BackgroundTasksSettings.model_fields # A stored/hydrated value is ignored, not applied. - s = BackgroundTasksSettings(celery_overrides={"task_serializer": "pickle"}) # pyright: ignore + s = BackgroundTasksSettings( # ty: ignore[pydantic-discarded-extra-argument] + celery_overrides={"task_serializer": "pickle"} + ) assert not hasattr(s, "celery_overrides") monkeypatch.setattr(celery_app, "_discover_task_packages", list) c = celery_app.build_celery(BackgroundTasksSettings(task_always_eager=True)) From f72fda61fb83892b3aac67fec1cbb5122a784039 Mon Sep 17 00:00:00 2001 From: Anto Subash Date: Fri, 13 Nov 2026 17:23:09 +0100 Subject: [PATCH 3/3] fix(cli): migrate ty rules and scaffold tooling to 0.0.100 --- CHANGELOG.md | 4 ++++ framework/cli/simple_module_cli/_lint_tooling.py | 5 ++--- .../cli/simple_module_cli/templates/host/pyproject.toml.tpl | 3 ++- .../simple_module_cli/templates/workspace/pyproject.toml.tpl | 3 ++- framework/cli/tests/test_cli_new_scaffold_layout.py | 3 ++- .../background_tasks/worker/tenant_celery.py | 2 +- pyproject.toml | 3 ++- skills/simple-module-conventions/SKILL.md | 2 +- 8 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91311688..5f0fba78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ All notable changes to this project are documented in this file. The format is b ## [Unreleased] +### Changed + +- The development type checker and scaffolded apps now use ty 0.0.100. Their configuration uses its renamed attribute rules while preserving the existing SQLModel suppressions; generated apps pin the tested 0.0.100 series (#894). + ### Added - `users`: `oauth_microsoft_discovery_url` points Microsoft sign-in at a local IdP through its discovery document, honoured only when `SM_ENVIRONMENT` is explicitly development or testing (unset does not count; anywhere else it is ignored and `users.oauth.microsoft_discovery_ignored` is logged). `docs/examples/keycloak-entra-realm.json` is a Keycloak realm with Entra-shaped claims (`tid`, `oid`, `upn`) for clicking through the flow before an Entra app exists. `simple_module_test` gains `OidcTestIssuer` and the `oidc_test_issuer` fixture (RSA key, JWKS, discovery document, `sign(claims)`) for testing an OpenID Connect sign-in without an IdP (#879). diff --git a/framework/cli/simple_module_cli/_lint_tooling.py b/framework/cli/simple_module_cli/_lint_tooling.py index 623ae021..b6373eb0 100644 --- a/framework/cli/simple_module_cli/_lint_tooling.py +++ b/framework/cli/simple_module_cli/_lint_tooling.py @@ -2,11 +2,10 @@ from __future__ import annotations -# ty is pre-1.0 and renames rules between releases (0.0.100 renamed -# ``unresolved-attribute``, which the scaffold's ``[tool.ty.rules]`` names), so +# ty is pre-1.0 and renames rules between releases, so # new apps get the range this repo is tested on, not the newest ty. # ``test_scaffold_lint_tooling.py`` fails once ``uv.lock`` moves past it. -TY_REQUIREMENT = "ty>=0.0.90,<0.0.100" +TY_REQUIREMENT = "ty>=0.0.100,<0.0.101" # Apps turn ty's ``invalid-assignment`` off, so this ignore would be reported as # unused there; only a module inside the framework repo, which checks the rule, diff --git a/framework/cli/simple_module_cli/templates/host/pyproject.toml.tpl b/framework/cli/simple_module_cli/templates/host/pyproject.toml.tpl index 1809917f..f0887762 100644 --- a/framework/cli/simple_module_cli/templates/host/pyproject.toml.tpl +++ b/framework/cli/simple_module_cli/templates/host/pyproject.toml.tpl @@ -49,7 +49,8 @@ ignore = [ # see through this, so ORM query expressions trip these rules with false # positives — real bugs still surface in tests. [tool.ty.rules] -unresolved-attribute = "ignore" +missing-attribute = "ignore" +missing-union-attribute = "ignore" unsupported-operator = "ignore" unknown-argument = "ignore" no-matching-overload = "ignore" diff --git a/framework/cli/simple_module_cli/templates/workspace/pyproject.toml.tpl b/framework/cli/simple_module_cli/templates/workspace/pyproject.toml.tpl index 81b29295..1c94c395 100644 --- a/framework/cli/simple_module_cli/templates/workspace/pyproject.toml.tpl +++ b/framework/cli/simple_module_cli/templates/workspace/pyproject.toml.tpl @@ -63,7 +63,8 @@ ignore = [ # see through this, so ORM query expressions trip these rules with false # positives — real bugs still surface in tests. [tool.ty.rules] -unresolved-attribute = "ignore" +missing-attribute = "ignore" +missing-union-attribute = "ignore" unsupported-operator = "ignore" unknown-argument = "ignore" no-matching-overload = "ignore" diff --git a/framework/cli/tests/test_cli_new_scaffold_layout.py b/framework/cli/tests/test_cli_new_scaffold_layout.py index c7802766..8f21a876 100644 --- a/framework/cli/tests/test_cli_new_scaffold_layout.py +++ b/framework/cli/tests/test_cli_new_scaffold_layout.py @@ -179,7 +179,8 @@ def test_sm_new_root_pyproject_has_dev_tooling_and_config(tmp_path: Path) -> Non assert any(d.startswith("simple_module_test==") for d in dev) assert data["tool"]["pytest"]["ini_options"]["asyncio_mode"] == "auto" assert data["tool"]["ruff"]["line-length"] == 100 - assert "unresolved-attribute" in data["tool"]["ty"]["rules"] + assert data["tool"]["ty"]["rules"]["missing-attribute"] == "ignore" + assert data["tool"]["ty"]["rules"]["missing-union-attribute"] == "ignore" def test_sm_new_generated_app_passes_its_own_ruff(tmp_path: Path) -> None: diff --git a/modules/background_tasks/background_tasks/worker/tenant_celery.py b/modules/background_tasks/background_tasks/worker/tenant_celery.py index 06883328..2181be65 100644 --- a/modules/background_tasks/background_tasks/worker/tenant_celery.py +++ b/modules/background_tasks/background_tasks/worker/tenant_celery.py @@ -52,7 +52,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: kwargs.setdefault("task_cls", TenantTask) super().__init__(*args, **kwargs) - def _task_from_fun( # ty: ignore[invalid-method-override] + def _task_from_fun( # ty: ignore[incompatible-method-override] self, fun: Any, name: Any = None, diff --git a/pyproject.toml b/pyproject.toml index 3b59eb16..880fc0cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,7 +113,8 @@ exclude = ["framework/hosting/simple_module_hosting/templates/**"] # trigger false positives in every service / endpoint / test that uses the ORM. # Downgrading these rules trades a known SQLModel typing limitation for a # clean lint baseline. Real bugs caught by these rules surface in tests. -unresolved-attribute = "ignore" +missing-attribute = "ignore" +missing-union-attribute = "ignore" unsupported-operator = "ignore" unknown-argument = "ignore" no-matching-overload = "ignore" diff --git a/skills/simple-module-conventions/SKILL.md b/skills/simple-module-conventions/SKILL.md index bd4c632c..01dc4133 100644 --- a/skills/simple-module-conventions/SKILL.md +++ b/skills/simple-module-conventions/SKILL.md @@ -114,7 +114,7 @@ Locale-related diagnostics: SM013 (missing file), SM014 (missing keys vs default ### 9. Don't re-enable the silenced ty rules -Projects using the `ty` type checker should globally suppress `unresolved-attribute`, `unsupported-operator`, `unknown-argument`, `no-matching-overload`, `invalid-argument-type`, and `invalid-assignment` in `pyproject.toml`. SQLModel runtime-instruments fields as SQLAlchemy attributes, so the type checker can't see what's there (and `model_config = ConfigDict(...)` clashes with ty's internal `SQLModelConfig` type, which `invalid-assignment` covers). Real bugs surface in tests. Line-level suppressions use ty's rule names, `# ty: ignore[]`; a mypy-style `# type: ignore[arg-type]` silences nothing under ty. +Projects using `ty` 0.0.100 should globally suppress `missing-attribute`, `missing-union-attribute`, `unsupported-operator`, `unknown-argument`, `no-matching-overload`, `invalid-argument-type`, and `invalid-assignment` in `pyproject.toml`. SQLModel runtime-instruments fields as SQLAlchemy attributes, so the type checker can't see what's there (and `model_config = ConfigDict(...)` clashes with ty's internal `SQLModelConfig` type, which `invalid-assignment` covers). Real bugs surface in tests. Line-level suppressions use ty's rule names, `# ty: ignore[]`; a mypy-style `# type: ignore[arg-type]` silences nothing under ty. ### 10. Declare external asset origins with `register_csp_sources`