1
0
forked from VimPlug/jedi

Definition -> Name

This commit is contained in:
Dave Halter
2020-03-17 09:33:12 +01:00
parent 0731206b9d
commit d26926a582
10 changed files with 59 additions and 59 deletions

View File

@@ -124,7 +124,7 @@ import pytest
import jedi
from jedi import debug
from jedi._compatibility import unicode, is_py3
from jedi.api.classes import Definition
from jedi.api.classes import Name
from jedi.api.completion import get_user_context
from jedi import parser_utils
from jedi.api.environment import get_default_environment, get_system_environment
@@ -244,7 +244,7 @@ class IntegrationTestCase(BaseTestCase):
raise Exception('Could not resolve %s on line %s'
% (match.string, self.line_nr - 1))
should_be |= set(Definition(inference_state, r.name) for r in results)
should_be |= set(Name(inference_state, r.name) for r in results)
debug.dbg('Finished getting types', color='YELLOW')
# Because the objects have different ids, `repr`, then compare.

View File

@@ -141,7 +141,7 @@ def test_infer_on_generator(Script):
def test_goto_definition_not_multiple(Script):
"""
There should be only one Definition result if it leads back to the same
There should be only one result if it leads back to the same
origin (e.g. instance method)
"""

View File

@@ -304,7 +304,7 @@ def test_builtins(Script):
def test_signature_is_definition(Script):
"""
Through inheritance, a signature is a sub class of Definition.
Through inheritance, a signature is a sub class of Name.
Check if the attributes match.
"""
s = """class Spam(): pass\nSpam"""