forked from VimPlug/jedi
Implement all remaining Path issues and use it instead of strings
This commit is contained in:
@@ -4,6 +4,7 @@ Imitate the parser representation.
|
||||
import re
|
||||
from functools import partial
|
||||
from inspect import Parameter
|
||||
from pathlib import Path
|
||||
|
||||
from jedi import debug
|
||||
from jedi.inference.utils import to_list
|
||||
@@ -312,7 +313,10 @@ class CompiledModule(CompiledValue):
|
||||
return tuple(name.split('.'))
|
||||
|
||||
def py__file__(self):
|
||||
return cast_path(self.access_handle.py__file__())
|
||||
path = cast_path(self.access_handle.py__file__())
|
||||
if path is None:
|
||||
return None
|
||||
return Path(path)
|
||||
|
||||
|
||||
class CompiledName(AbstractNameDefinition):
|
||||
|
||||
Reference in New Issue
Block a user