From d662e7359ebf72de831edf01754540b062cd813c Mon Sep 17 00:00:00 2001 From: "Yi Yang @ Anteros" Date: Thu, 2 Jan 2025 04:29:14 +0800 Subject: [PATCH] (agrf) Fix magic. --- agrf/magic/functor.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/agrf/magic/functor.py b/agrf/magic/functor.py index 9e22c59d..2ef2af94 100644 --- a/agrf/magic/functor.py +++ b/agrf/magic/functor.py @@ -1,7 +1,5 @@ -from abc import ABC, abstractmethod from collections.abc import Collection, Mapping, Hashable - def deep_freeze(thing): if thing is None or isinstance(thing, str): return thing @@ -15,15 +13,14 @@ def deep_freeze(thing): return thing -class CachedFunctorMixin(ABC): +class CachedFunctorMixin: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.attr_cache = {} self.call_cache = {} - @abstractmethod def fmap(self, f): - pass + raise NotImplementedError() def __getattr__(self, name): if name in self.attr_cache: