mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-17 22:09:37 +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]:
|
def py__file__(self) -> Optional[Path]:
|
||||||
try:
|
try:
|
||||||
return Path(self._obj.__file__)
|
return Path(self._obj.__file__)
|
||||||
except AttributeError:
|
except (AttributeError, TypeError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def py__doc__(self):
|
def py__doc__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user