From eb4971686a2280d04f4f25e96f9c386e21e7a515 Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Mon, 29 Jun 2026 11:01:53 +0200 Subject: [PATCH] fix(checker): allow calling unknown method on dataframes --- midas/checker/frame_methods.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/midas/checker/frame_methods.py b/midas/checker/frame_methods.py index 0220ba0..8a7dfbc 100644 --- a/midas/checker/frame_methods.py +++ b/midas/checker/frame_methods.py @@ -42,7 +42,7 @@ class Call: class _MethodRegistryMeta(type): - _methods: dict[str, Callable] = {} + _methods: dict[str, Callable[..., Type]] = {} def __new__( cls, @@ -55,7 +55,7 @@ class _MethodRegistryMeta(type): for attr in namespace.values(): if callable(attr) and hasattr(attr, "__method_names__"): for name in attr.__method_names__: # type: ignore - new_class._methods[name] = attr + new_class._methods[name] = attr # type: ignore return new_class @@ -76,9 +76,9 @@ class MethodRegistry(metaclass=_MethodRegistryMeta): method: str, call: Call, ) -> Type: - func: Optional[Callable] = self._methods.get(method) + func: Optional[Callable[..., Type]] = self._methods.get(method) if func is None: - self.reporter.error(call.location, f"Unknown method {method}") + self.reporter.warning(call.location, f"Unknown method {method}") return UnknownType() return func(self, call)