diff --git a/pymbolic/primitives.py b/pymbolic/primitives.py index d42427cfb6592c614eb2c2e33a68716b5d4ebfbd..caf0dbfb8eebdda4d61df1579075f63c7c763a2f 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)