From 5b81c5846f88e119d617d26a64a5bc06d9bcc579 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 11 Sep 2025 16:19:50 +0200 Subject: [PATCH] Handle GenericAlias special case breaking previous switch to "Clearable" subclassing. --- ircplom/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ircplom/client.py b/ircplom/client.py index 2c818c1..500e98b 100644 --- a/ircplom/client.py +++ b/ircplom/client.py @@ -563,6 +563,8 @@ class _ClientDb(_Clearable, _UpdatingMixin, SharedClientDbFields): def clear(self) -> None: for key, value in [(k, v) for k, v in self._deep_annotations().items() if k not in self._keep_on_clear]: + if hasattr(value, '__origin__'): + value = value.__origin__ if issubclass(value, _Clearable): getattr(self, key).clear() elif issubclass(value, str): -- 2.30.2