From 5994fbde275c5a40b64e3b7531698969c8d5252e Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sat, 18 Jul 2026 10:43:06 +0500 Subject: [PATCH] ty: check `assert_never` Had to bump `ty`, because 0.0.61 added support for `value in [A, B, C]` pattern for type narrowing. --- pyproject.toml | 1 - requirements-tools.txt | 2 +- src/bonsai/bonsai/tool/pset.py | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d832213792..7d7f6719fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,7 +111,6 @@ no-matching-overload = "ignore" not-subscriptable = "ignore" unsupported-dynamic-base = "ignore" unsupported-operator = "ignore" -type-assertion-failure = "ignore" [tool.ty.environment] extra-paths = [ diff --git a/requirements-tools.txt b/requirements-tools.txt index 33a2505707..8f7aa4f792 100644 --- a/requirements-tools.txt +++ b/requirements-tools.txt @@ -1,5 +1,5 @@ black==26.3.1 ruff==0.15.12 poethepoet -ty==0.0.59 +ty==0.0.61 gersemi==0.26.1 diff --git a/src/bonsai/bonsai/tool/pset.py b/src/bonsai/bonsai/tool/pset.py index aa72a85e6f..47d5155eee 100644 --- a/src/bonsai/bonsai/tool/pset.py +++ b/src/bonsai/bonsai/tool/pset.py @@ -124,6 +124,9 @@ class Pset(bonsai.core.tool.Pset): return bpy.context.scene.GroupPsetProperties elif obj_type == "Zone": return bpy.context.scene.ZonePsetProperties + elif obj_type == "Cost": + # No psets for cost items currently. + assert False, obj_type assert_never(obj_type) @classmethod