Handle object with __file__ attribute having a None value (issue #2082)

This commit is contained in:
Mark Diekhans
2025-12-20 17:24:25 -08:00
parent b80c0b8992
commit a89757a966

View File

@@ -184,7 +184,7 @@ class DirectObjectAccess:
def py__file__(self) -> Optional[Path]:
try:
return Path(self._obj.__file__)
except AttributeError:
except (AttributeError, TypeError):
return None
def py__doc__(self):