Skip to content

Commit 426492b

Browse files
Fix mypy error and add changelog entry
Use ClassVar for inheritable on both ClassDecoratorSetting and Union to satisfy mypy. Add unreleased changelog entry for #80. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e88ff35 commit 426492b

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎.changelog/_unreleased.toml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[[entries]]
2+
id = "f3a8c1d2-7e4b-4a9f-b6c5-2d1e8f9a0b3c"
3+
type = "fix"
4+
description = "Fix #80: Union setting inherited via MRO causing RecursionError during serialization/deserialization"
5+
author = "@NiklasRosenstein"

‎databind/src/databind/core/settings.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def __init__(self) -> None:
160160

161161
class ClassDecoratorSetting(Setting):
162162
bound_to: t.Optional[type] = None
163-
inheritable: bool = True
163+
inheritable: t.ClassVar[bool] = True
164164

165165
def __init__(self) -> None:
166166
if type(self) is ClassDecoratorSetting:

0 commit comments

Comments
 (0)