diff --git a/builtin.py b/builtin.py index b8127a42..0a9aeec0 100644 --- a/builtin.py +++ b/builtin.py @@ -120,8 +120,6 @@ class Parser(CachedModule): path = os.path.dirname(self.path) load_module(name, path) - - return self._module def _get_source(self): diff --git a/dynamic.py b/dynamic.py index 2756f1a4..81c95737 100644 --- a/dynamic.py +++ b/dynamic.py @@ -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' diff --git a/helpers.py b/helpers.py index ef4ca4fe..04b2165f 100644 --- a/helpers.py +++ b/helpers.py @@ -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 = [] diff --git a/imports.py b/imports.py index c2d9b5c9..1bde5447 100644 --- a/imports.py +++ b/imports.py @@ -182,6 +182,7 @@ def strip_imports(scopes): result.append(s) return result + def remove_star_imports(scope): """ """ diff --git a/parsing.py b/parsing.py index a1876053..015a1c64 100644 --- a/parsing.py +++ b/parsing.py @@ -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