diff --git a/README.mdown b/README.mdown index 2621d270..e95e485a 100644 --- a/README.mdown +++ b/README.mdown @@ -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. diff --git a/functions.py b/functions.py index 9be71453..b4bf8888 100644 --- a/functions.py +++ b/functions.py @@ -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 diff --git a/test/run.py b/test/run.py index 65de003e..d74dc980 100755 --- a/test/run.py +++ b/test/run.py @@ -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: