From 3eeecff1a195ddfaae93928ca27c817d70053e8e Mon Sep 17 00:00:00 2001 From: David Halter Date: Sun, 28 Apr 2013 22:12:32 +0430 Subject: [PATCH] fixed some position issues --- jedi/evaluate.py | 6 +++--- jedi/parsing.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jedi/evaluate.py b/jedi/evaluate.py index 8e8cc921..6dc1bd9c 100644 --- a/jedi/evaluate.py +++ b/jedi/evaluate.py @@ -133,20 +133,20 @@ def get_names_of_scope(scope, position=None, star_search=True, ... ''') >>> scope = parser.module.subscopes[0] >>> scope - + `get_names_of_scope` is a generator. First it yields names from most inner scope. >>> pairs = list(get_names_of_scope(scope)) >>> pairs[0] - (, []) + (, []) Then it yield the names from one level outer scope. For this example, this is the most outer scope. >>> pairs[1] - (, [, ]) + (, [, ]) Finally, it yields names from builtin, if `include_builtin` is true (default). diff --git a/jedi/parsing.py b/jedi/parsing.py index a9605174..26390604 100644 --- a/jedi/parsing.py +++ b/jedi/parsing.py @@ -430,8 +430,8 @@ class Parser(object): except (StopIteration, common.MultiLevelStopIteration): # on finish, set end_pos correctly s = self.scope - while s is not None and (not isinstance(s, pr.Module) - and isinstance(s, pr.SubModule)): + while s is not None and not (isinstance(s, pr.Module) + and not isinstance(s, pr.SubModule)): s.end_pos = self.end_pos s = s.parent raise