From f8f66b59650068aaca65784b87fc13ad109324c4 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 28 Nov 2024 00:16:55 -0600 Subject: [PATCH] Type _classproperty --- pymbolic/primitives.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pymbolic/primitives.py b/pymbolic/primitives.py index d42427c..caf0dbf 100644 --- a/pymbolic/primitives.py +++ b/pymbolic/primitives.py @@ -368,7 +368,8 @@ def disable_subscript_by_getitem(): # https://stackoverflow.com/a/13624858 class _classproperty(property): # noqa: N801 - def __get__(self, owner_self, owner_cls): + def __get__(self, owner_self: Any, owner_cls: type | None = None) -> Any: + assert self.fget is not None return self.fget(owner_cls)