diff --git a/my/core/stats.py b/my/core/stats.py index 1a59059..ec78839 100644 --- a/my/core/stats.py +++ b/my/core/stats.py @@ -34,9 +34,6 @@ def is_data_provider(fun: Any) -> bool: # one example which could benefit is my.pdfs if fun is None: return False - # probably a helper function? - if fun.__name__.startswith("_"): - return False # todo. uh.. very similar to what cachew is trying to do? try: sig = inspect.signature(fun) @@ -47,6 +44,10 @@ def is_data_provider(fun: Any) -> bool: if len(list(sig_required_params(sig))) > 0: return False + # probably a helper function? + if fun.__name__.startswith("_"): + return False + return_type = sig.return_annotation return type_is_iterable(return_type)