1
0
forked from VimPlug/jedi

fix a problem with python3

This commit is contained in:
David Halter
2012-12-09 19:40:30 +01:00
parent a012880c0c
commit 830f50e314
3 changed files with 3 additions and 3 deletions

View File

@@ -192,7 +192,7 @@ class Completion(BaseDefinition):
return [self] return [self]
self._followed_definitions = \ self._followed_definitions = \
[BaseDefinition(d, start_pos=None) for d in defs] [BaseDefinition(d, d.start_pos) for d in defs]
evaluate.clear_caches() evaluate.clear_caches()
return self._followed_definitions return self._followed_definitions

View File

@@ -462,7 +462,7 @@ def check_flow_information(flow, search_name, pos):
result = [] result = []
if isinstance(flow, parsing.Scope) and not result: if isinstance(flow, parsing.Scope) and not result:
for ass in reversed(flow.asserts): for ass in reversed(flow.asserts):
if ass.start_pos > pos: if pos is None or ass.start_pos > pos:
continue continue
result = check_statement_information(ass, search_name) result = check_statement_information(ass, search_name)
if result: if result:

View File

@@ -301,7 +301,7 @@ class TestSpeed(Base):
for i in range(number): for i in range(number):
func(self) func(self)
single_time = (time.time() - first) / number single_time = (time.time() - first) / number
print('speed', func, single_time) print('\nspeed', func, single_time)
assert single_time < time_per_run assert single_time < time_per_run
return wrapper return wrapper
return decorated return decorated