forked from VimPlug/jedi
Force unicode when listing module names
pkgutil.iter_modules may return the module name as str instead of unicode on Python 2.
This commit is contained in:
@@ -69,7 +69,7 @@ def get_module_info(evaluator, sys_path=None, full_name=None, **kwargs):
|
|||||||
|
|
||||||
def list_module_names(evaluator, search_path):
|
def list_module_names(evaluator, search_path):
|
||||||
return [
|
return [
|
||||||
name
|
force_unicode(name)
|
||||||
for module_loader, name, is_pkg in iter_modules(search_path)
|
for module_loader, name, is_pkg in iter_modules(search_path)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user