Stdlib modules should not be included in the get_references search, fixes davidhalter/jedi-vim#792

This commit is contained in:
Dave Halter
2021-01-02 00:58:50 +01:00
parent 7d160f96f6
commit 55c7e4eb49
4 changed files with 30 additions and 6 deletions

View File

@@ -107,6 +107,7 @@ import operator
from ast import literal_eval
from io import StringIO
from functools import reduce
from unittest.mock import ANY
import parso
from _pytest.outcomes import Skipped
@@ -275,6 +276,8 @@ class IntegrationTestCase(BaseTestCase):
for pos_tup in positions:
if type(pos_tup[0]) == str:
# this means that there is a module specified
if pos_tup[1] == ...:
pos_tup = pos_tup[0], ANY, pos_tup[2]
wanted.append(pos_tup)
else:
line = pos_tup[0]