1
0
forked from VimPlug/jedi

Implement all remaining Path issues and use it instead of strings

This commit is contained in:
Dave Halter
2020-07-12 01:14:00 +02:00
parent db0e90763b
commit 480a464179
23 changed files with 131 additions and 97 deletions

View File

@@ -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):