mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-20 18:18:27 +08:00
Use automatic formatters
This commit is contained in:
@@ -71,7 +71,7 @@ def find_module_py33(string, path=None, loader=None, fullname=None):
|
|||||||
raise ImportError("Originally " + repr(e))
|
raise ImportError("Originally " + repr(e))
|
||||||
|
|
||||||
if loader is None:
|
if loader is None:
|
||||||
raise ImportError("Couldn't find a loader for {0}".format(string))
|
raise ImportError("Couldn't find a loader for {}".format(string))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
is_package = loader.is_package(string)
|
is_package = loader.is_package(string)
|
||||||
@@ -135,7 +135,7 @@ def find_module_pre_py33(string, path=None, fullname=None):
|
|||||||
return (file, module_path, is_package)
|
return (file, module_path, is_package)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
raise ImportError("No module named {0}".format(string))
|
raise ImportError("No module named {}".format(string))
|
||||||
|
|
||||||
|
|
||||||
find_module = find_module_py33 if is_py33 else find_module_pre_py33
|
find_module = find_module_py33 if is_py33 else find_module_pre_py33
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ def _evaluate_for_statement_string(module_context, string):
|
|||||||
Need this docstring so that if the below part is not valid Python this
|
Need this docstring so that if the below part is not valid Python this
|
||||||
is still a function.
|
is still a function.
|
||||||
'''
|
'''
|
||||||
{0}
|
{}
|
||||||
"""))
|
"""))
|
||||||
if string is None:
|
if string is None:
|
||||||
return []
|
return []
|
||||||
|
|||||||
Reference in New Issue
Block a user