mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-25 06:41:07 +08:00
Handle object with __file__ attribute having a None value (issue #2082)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user