Not all objects have a `.__name__`

nspaths
Tyler Goodlet 2022-01-27 16:43:31 -05:00
parent b6ae77b5ac
commit 2900ceb003
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ class NamespacePath(str):
) -> tuple[str, str]: ) -> tuple[str, str]:
ref = self.load_ref() ref = self.load_ref()
return ref.__module__, ref.__name__ return ref.__module__, getattr(ref, '__name__', '')
@classmethod @classmethod
def from_ref( def from_ref(