mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
pep8 compatibility
This commit is contained in:
@@ -120,8 +120,6 @@ class Parser(CachedModule):
|
||||
path = os.path.dirname(self.path)
|
||||
|
||||
load_module(name, path)
|
||||
|
||||
|
||||
return self._module
|
||||
|
||||
def _get_source(self):
|
||||
|
||||
@@ -191,7 +191,7 @@ class ArrayInstance(parsing.Base):
|
||||
if isinstance(temp, ArrayInstance):
|
||||
items += temp.iter_content()
|
||||
continue
|
||||
items += evaluate.handle_iterators([array])#array.get_index_types()
|
||||
items += evaluate.handle_iterators([array])
|
||||
|
||||
module = self.var_args.parent_stmt.get_parent_until()
|
||||
is_list = str(self.instance.name) == 'list'
|
||||
|
||||
@@ -18,7 +18,8 @@ class RecursionDecorator(object):
|
||||
# Don't check param instances, they are not causing recursions
|
||||
# The same's true for the builtins, because the builtins are really
|
||||
# simple.
|
||||
if isinstance(stmt, parsing.Param) or r.script == builtin.Builtin.scope:
|
||||
if isinstance(stmt, parsing.Param) \
|
||||
or r.script == builtin.Builtin.scope:
|
||||
return self.func(stmt, *args, **kwargs)
|
||||
|
||||
if self.check_recursion(r):
|
||||
@@ -42,6 +43,7 @@ class RecursionDecorator(object):
|
||||
self.top = None
|
||||
self.current = None
|
||||
|
||||
|
||||
class RecursionNode(object):
|
||||
def __init__(self, stmt, parent):
|
||||
self.script = stmt.get_parent_until()
|
||||
@@ -60,6 +62,7 @@ def fast_parent_copy(obj):
|
||||
"""
|
||||
new_elements = {}
|
||||
classes = (parsing.Call, parsing.Scope)
|
||||
|
||||
def recursion(obj):
|
||||
new_obj = copy.copy(obj)
|
||||
new_elements[obj] = new_obj
|
||||
@@ -84,6 +87,7 @@ def fast_parent_copy(obj):
|
||||
return copied_list
|
||||
return recursion(obj)
|
||||
|
||||
|
||||
def generate_param_array(args_tuple, parent_stmt=None):
|
||||
""" This generates an array, that can be used as a param """
|
||||
values = []
|
||||
|
||||
@@ -182,6 +182,7 @@ def strip_imports(scopes):
|
||||
result.append(s)
|
||||
return result
|
||||
|
||||
|
||||
def remove_star_imports(scope):
|
||||
"""
|
||||
"""
|
||||
|
||||
@@ -64,6 +64,7 @@ class Base(object):
|
||||
def isinstance(self, *cls):
|
||||
return isinstance(self, cls)
|
||||
|
||||
|
||||
class Simple(Base):
|
||||
"""
|
||||
The super class for Scope, Import, Name and Statement. Every object in
|
||||
|
||||
Reference in New Issue
Block a user