avoid possible attribute err

This commit is contained in:
Sean Breckenridge 2021-04-19 02:30:02 -07:00
parent b95d4586e2
commit fa5983613b

View file

@ -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