From b66e4e9056d5b461f400851eb613318a27a0ed5e Mon Sep 17 00:00:00 2001 From: Daniel Nunes Locatelli Date: Tue, 14 Jul 2026 13:13:25 +0200 Subject: [PATCH 1/3] Make Data.__dtype__ delegate to Data.__clstype__ Both computed the identical dtype string with duplicated format expressions. __clstype__ is now the single source of truth; the instance-level property delegates to it (a classmethod accessed via an instance binds type(self), so subclasses resolve correctly). Facade classes (Brep, NurbsCurve, NurbsSurface) keep their own __dtype__ overrides, which shadow the base property, so backend-pinning behaviour is unchanged. Co-Authored-By: Claude Fable 5 --- src/compas/data/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compas/data/data.py b/src/compas/data/data.py index aaaf562f0bd1..44ad909235ae 100644 --- a/src/compas/data/data.py +++ b/src/compas/data/data.py @@ -73,7 +73,7 @@ def __init__(self, name=None): @property def __dtype__(self): - return "{}/{}".format(".".join(self.__class__.__module__.split(".")[:2]), self.__class__.__name__) + return self.__clstype__() @classmethod def __clstype__(cls): From c351aaa96953f20794778cc5854126ec01f125b5 Mon Sep 17 00:00:00 2001 From: Daniel Nunes Locatelli Date: Tue, 14 Jul 2026 13:13:25 +0200 Subject: [PATCH 2/3] Add author entry for dtype delegation change Co-Authored-By: Claude Fable 5 --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index 814201bb0a62..49e6c06021a0 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -44,3 +44,4 @@ - Oliver Bucklin <> [@obucklin](https://github.com/obucklin) - Dominik Reisach <> [@dominikreisach](https://github.com/dominikreisach) - Eric Gozzi <> [@ericgozzi](https://github.com/ericgozzi) +- Daniel Nunes Locatelli <> [@daniel-locatelli](https://github.com/daniel-locatelli) From 910943ef53c3dbbfd43ab07585916f5f423712f3 Mon Sep 17 00:00:00 2001 From: Daniel Nunes Locatelli Date: Wed, 29 Jul 2026 10:53:19 +0200 Subject: [PATCH 3/3] Add CHANGELOG entry for dtype delegation change Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48f846510721..46f5a93bc5c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +* Changed `Data.__dtype__` to delegate to `Data.__clstype__` (removes duplicated dtype format logic). * Changed `Tolerance` class to no longer use singleton pattern. `Tolerance()` now creates independent instances instead of returning the global `TOL`. * Renamed `Tolerance.units` to `Tolerance.unit` to better reflect the documented properties. Left `units` with deprecation warning. * Fixed `NotImplementedErorr` when calling `BrepLoop.vertices`.