pep8 compatibility

This commit is contained in:
David Halter
2012-08-10 23:31:56 +02:00
parent 76eb3e53e7
commit 2d6ba4e8ec
5 changed files with 8 additions and 4 deletions

View File

@@ -120,8 +120,6 @@ class Parser(CachedModule):
path = os.path.dirname(self.path) path = os.path.dirname(self.path)
load_module(name, path) load_module(name, path)
return self._module return self._module
def _get_source(self): def _get_source(self):

View File

@@ -191,7 +191,7 @@ class ArrayInstance(parsing.Base):
if isinstance(temp, ArrayInstance): if isinstance(temp, ArrayInstance):
items += temp.iter_content() items += temp.iter_content()
continue continue
items += evaluate.handle_iterators([array])#array.get_index_types() items += evaluate.handle_iterators([array])
module = self.var_args.parent_stmt.get_parent_until() module = self.var_args.parent_stmt.get_parent_until()
is_list = str(self.instance.name) == 'list' is_list = str(self.instance.name) == 'list'

View File

@@ -18,7 +18,8 @@ class RecursionDecorator(object):
# Don't check param instances, they are not causing recursions # Don't check param instances, they are not causing recursions
# The same's true for the builtins, because the builtins are really # The same's true for the builtins, because the builtins are really
# simple. # 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) return self.func(stmt, *args, **kwargs)
if self.check_recursion(r): if self.check_recursion(r):
@@ -42,6 +43,7 @@ class RecursionDecorator(object):
self.top = None self.top = None
self.current = None self.current = None
class RecursionNode(object): class RecursionNode(object):
def __init__(self, stmt, parent): def __init__(self, stmt, parent):
self.script = stmt.get_parent_until() self.script = stmt.get_parent_until()
@@ -60,6 +62,7 @@ def fast_parent_copy(obj):
""" """
new_elements = {} new_elements = {}
classes = (parsing.Call, parsing.Scope) classes = (parsing.Call, parsing.Scope)
def recursion(obj): def recursion(obj):
new_obj = copy.copy(obj) new_obj = copy.copy(obj)
new_elements[obj] = new_obj new_elements[obj] = new_obj
@@ -84,6 +87,7 @@ def fast_parent_copy(obj):
return copied_list return copied_list
return recursion(obj) return recursion(obj)
def generate_param_array(args_tuple, parent_stmt=None): def generate_param_array(args_tuple, parent_stmt=None):
""" This generates an array, that can be used as a param """ """ This generates an array, that can be used as a param """
values = [] values = []

View File

@@ -182,6 +182,7 @@ def strip_imports(scopes):
result.append(s) result.append(s)
return result return result
def remove_star_imports(scope): def remove_star_imports(scope):
""" """
""" """

View File

@@ -64,6 +64,7 @@ class Base(object):
def isinstance(self, *cls): def isinstance(self, *cls):
return isinstance(self, cls) return isinstance(self, cls)
class Simple(Base): class Simple(Base):
""" """
The super class for Scope, Import, Name and Statement. Every object in The super class for Scope, Import, Name and Statement. Every object in