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:
Dave Halter
2019-12-11 00:30:26 +01:00
parent a2cebc4b92
commit 536a77551b

View File

@@ -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,