From 536a77551b3a7d2e5f5470a903a86f46786ddc65 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 11 Dec 2019 00:30:26 +0100 Subject: [PATCH] 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. --- jedi/inference/gradual/typeshed.py | 1 + 1 file changed, 1 insertion(+) diff --git a/jedi/inference/gradual/typeshed.py b/jedi/inference/gradual/typeshed.py index b2af277d..2d589a8d 100644 --- a/jedi/inference/gradual/typeshed.py +++ b/jedi/inference/gradual/typeshed.py @@ -163,6 +163,7 @@ def _try_to_load_stub(inference_state, import_names, python_value_set, if len(import_names) == 1: # foo-stubs for p in sys_path: + p = cast_path(p) init = os.path.join(p, *import_names) + '-stubs' + os.path.sep + '__init__.pyi' m = _try_to_load_stub_from_file( inference_state,