get_definitions -> get_definition

This commit is contained in:
David Halter
2012-09-04 18:47:07 +02:00
parent cf953c9d02
commit 686c675b6d
3 changed files with 4 additions and 4 deletions

View File

@@ -130,7 +130,7 @@ have the following objects available:
> Similar to complete. The returned `functions.Definition` objects contain
> information about the definitions found.
`get_definitions`
`get_definition`
> A mostly for tests used function. Like goto, but follows statements and
> imports and doesn't break there. You probably don't want to use this
> function. It's mostly for testing.

View File

@@ -10,7 +10,7 @@ import debug
import imports
import settings
__all__ = ['complete', 'goto', 'get_definitions',
__all__ = ['complete', 'goto', 'get_definition',
'NotFoundError', 'set_debug_function']
@@ -222,7 +222,7 @@ def _prepare_goto(source, position, source_path, module, goto_path,
return scopes
def get_definitions(source, line, column, source_path):
def get_definition(source, line, column, source_path):
"""
Returns the definitions of a the path under the cursor.
This is not a goto function! This follows complicated paths and returns the

View File

@@ -46,7 +46,7 @@ def run_definition_test(correct, source, line_nr, line, correct_start, path):
Return if the test was a fail or not, with 1 for fail and 0 for success.
"""
def defs(line_nr, indent):
return set(functions.get_definitions(source, line_nr, indent, path))
return set(functions.get_definition(source, line_nr, indent, path))
try:
result = defs(line_nr, len(line))
except Exception: