1
0
forked from VimPlug/jedi

(Mostly) whitespace fixes

This commit is contained in:
Laurens Van Houtven
2013-07-10 14:45:47 +02:00
parent 8dae2049c9
commit cdc41128b4
18 changed files with 165 additions and 162 deletions

View File

@@ -55,7 +55,7 @@ class Module(pr.Simple, pr.Module):
def __repr__(self):
return "<%s: %s@%s-%s>" % (type(self).__name__, self.name,
self.start_pos[0], self.end_pos[0])
self.start_pos[0], self.end_pos[0])
class CachedFastParser(type):
@@ -67,7 +67,7 @@ class CachedFastParser(type):
pi = cache.parser_cache.get(module_path, None)
if pi is None or isinstance(pi.parser, parsing.Parser):
p = super(CachedFastParser, self).__call__(source, module_path,
user_position)
user_position)
else:
p = pi.parser # pi is a `cache.ParserCacheItem`
p.update(source, user_position)
@@ -204,7 +204,7 @@ class FastParser(use_metaclass(CachedFastParser)):
self._user_scope = p.user_scope
if isinstance(self._user_scope, pr.SubModule) \
or self._user_scope is None:
or self._user_scope is None:
self._user_scope = self.module
return self._user_scope
@@ -324,11 +324,11 @@ class FastParser(use_metaclass(CachedFastParser)):
if self.current_node is not None:
self.current_node = \
self.current_node.parent_until_indent(indent)
self.current_node.parent_until_indent(indent)
nodes += self.current_node.old_children
# check if code_part has already been parsed
#print '#'*45,line_offset, p and p.end_pos, '\n', code_part
# print '#'*45,line_offset, p and p.end_pos, '\n', code_part
p, node = self._get_parser(code_part, code[start:],
line_offset, nodes, not is_first)
@@ -365,7 +365,7 @@ class FastParser(use_metaclass(CachedFastParser)):
is_first = False
else:
#print '#'*45, line_offset, p.end_pos, 'theheck\n', code_part
# print '#'*45, line_offset, p.end_pos, 'theheck\n', code_part
pass
line_offset += lines
@@ -378,7 +378,7 @@ class FastParser(use_metaclass(CachedFastParser)):
self.module.end_pos = self.parsers[-1].end_pos
#print(self.parsers[0].module.get_code())
# print(self.parsers[0].module.get_code())
del code
def _get_parser(self, code, parser_code, line_offset, nodes, no_docstr):
@@ -408,7 +408,7 @@ class FastParser(use_metaclass(CachedFastParser)):
# It's important to take care of the whole user
# positioning stuff, if no reparsing is being done.
p.user_stmt = m.get_statement_for_position(
self.user_position, include_imports=True)
self.user_position, include_imports=True)
if p.user_stmt:
p.user_scope = p.user_stmt.parent
else: