mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-29 03:33:19 +08:00
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:
1 parent
282c6a2ba1
commit
95f835a014
1 file changed
+1
-1
@@ -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