forked from VimPlug/jedi
Account for sys path potentially not being all unicode in typeshed, fixes #1456
This is a bit stupid, but don't care too much, it will get removed soon, when Python 2 support is going to get removed.
This commit is contained in:
@@ -163,6 +163,7 @@ def _try_to_load_stub(inference_state, import_names, python_value_set,
|
|||||||
if len(import_names) == 1:
|
if len(import_names) == 1:
|
||||||
# foo-stubs
|
# foo-stubs
|
||||||
for p in sys_path:
|
for p in sys_path:
|
||||||
|
p = cast_path(p)
|
||||||
init = os.path.join(p, *import_names) + '-stubs' + os.path.sep + '__init__.pyi'
|
init = os.path.join(p, *import_names) + '-stubs' + os.path.sep + '__init__.pyi'
|
||||||
m = _try_to_load_stub_from_file(
|
m = _try_to_load_stub_from_file(
|
||||||
inference_state,
|
inference_state,
|
||||||
|
|||||||
Reference in New Issue
Block a user