From fa5983613befaf65af54d4ade9c520386ae822d5 Mon Sep 17 00:00:00 2001 From: Sean Breckenridge Date: Mon, 19 Apr 2021 02:30:02 -0700 Subject: [PATCH] avoid possible attribute err --- my/core/stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my/core/stats.py b/my/core/stats.py index ec78839..869b53f 100644 --- a/my/core/stats.py +++ b/my/core/stats.py @@ -45,7 +45,7 @@ def is_data_provider(fun: Any) -> bool: return False # probably a helper function? - if fun.__name__.startswith("_"): + if hasattr(fun, '__name__') and fun.__name__.startswith('_'): return False return_type = sig.return_annotation