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

@@ -1,3 +1,5 @@
from pathlib import Path
from parso.python.tree import search_ancestor
from jedi.inference.cache import inference_state_method_cache
from jedi.inference.imports import load_module_from_path
@@ -128,7 +130,7 @@ def _iter_pytest_modules(module_context, skip_own_module=False):
sys_path = module_context.inference_state.get_sys_path()
while any(folder.path.startswith(p) for p in sys_path):
file_io = folder.get_file_io('conftest.py')
if file_io.path != module_context.py__file__():
if Path(file_io.path) != module_context.py__file__():
try:
m = load_module_from_path(module_context.inference_state, file_io)
yield m.as_context()