From 9a0f1363e35c9d4392d533af2ff9ee48d5835875 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sun, 1 Feb 2015 02:32:52 +0100 Subject: [PATCH] Start removing the print statements that were used for debugging. --- jedi/evaluate/representation.py | 1 - jedi/parser/fast.py | 7 +++---- jedi/parser/user_context.py | 3 --- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/jedi/evaluate/representation.py b/jedi/evaluate/representation.py index fc82de57..9463020c 100644 --- a/jedi/evaluate/representation.py +++ b/jedi/evaluate/representation.py @@ -177,7 +177,6 @@ class Instance(use_metaclass(CachedMetaClass, Executed)): return names def get_subscope_by_name(self, name): - print(name) sub = self.base.get_subscope_by_name(name) return get_instance_el(self._evaluator, self, sub, True) diff --git a/jedi/parser/fast.py b/jedi/parser/fast.py index c6b1737c..13a06e0f 100644 --- a/jedi/parser/fast.py +++ b/jedi/parser/fast.py @@ -186,7 +186,7 @@ class ParserNode(object): Closes the current parser node. This means that after this no further nodes should be added anymore. """ - print('CLOSE NODE', id(self), self.parent, self._node_children) + #print('CLOSE NODE', id(self), self.parent, self._node_children) # We only need to replace the dict if multiple dictionaries are used: if self._node_children: dcts = [n.parser.module.names_dict for n in self._node_children] @@ -405,8 +405,9 @@ class FastParser(use_metaclass(CachedFastParser)): for code_part in self._split_parts(source): if not is_first: - print('OFF', line_offset + 1, self.current_node.parser.module.end_pos) + #print('OFF', line_offset + 1, self.current_node.parser.module.end_pos) #import pdb; pdb.set_trace() + pass if is_first or line_offset + 1 == self.current_node.parser.module.end_pos[0]: indent = len(code_part) - len(code_part.lstrip('\t ')) self.current_node = self.current_node.parent_until_indent(indent) @@ -493,7 +494,6 @@ class FastParser(use_metaclass(CachedFastParser)): node = ParserNode(self.module) end = line_offset + p.module.end_pos[0] - print('\nACTUALLY PARSING', p.module.end_pos, repr(source), len(self._lines), line_offset) if not (len(self._lines) == end): # We don't keep the last line, except if were done. A newline # ends on the next line, which is part of the next parser. But @@ -551,7 +551,6 @@ class FastTokenizer(object): self._indent_counter += 1 elif typ == DEDENT: self._indent_counter -= 1 - print(self._in_flow, self._indent_counter, self._flow_indent_counter) if self._in_flow and self._indent_counter == self._flow_indent_counter: self._in_flow = False elif not self._in_flow: diff --git a/jedi/parser/user_context.py b/jedi/parser/user_context.py index 45ca9b71..8e4f5da1 100644 --- a/jedi/parser/user_context.py +++ b/jedi/parser/user_context.py @@ -284,11 +284,8 @@ class UserContextParser(object): user_stmt = self.user_stmt() if user_stmt is None: def scan(scope): - print(scope, scope.subscopes) for s in scope.subscopes + list(reversed(scope.flows)): if isinstance(s, (pr.Scope, pr.Flow)): - print(s, self._position, 'X', s.start_pos, s.end_pos, s.children, - s.children[-2]) if s.start_pos <= self._position <= s.end_pos: if isinstance(s, pr.Flow): return s