repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
python-jsonschema/jsonschema
3992d99a74099c99cc02338ecffa5647d0a2bdc4
349
train
train
jsonschema/tests/test_validators.py
test_iter_errors
self.assertEqual
collection
46
from collections import deque, namedtuple from contextlib import contextmanager from decimal import Decimal from io import BytesIO from unittest import TestCase from urllib.request import pathname2url import json import os import sys import tempfile import unittest from twisted.trial.unittest import SynchronousTestCas...
[])
3992d99a74099c99cc02338ecffa5647d0a2bdc4
349
v2_extractor_at_anchor
python-jsonschema/jsonschema
3992d99a74099c99cc02338ecffa5647d0a2bdc4
349
train
train
jsonschema/tests/test_validators.py
test_it_retrieves_unstored_refs_via_urlopen
self.assertEqual
numeric_literal
57
from collections import deque, namedtuple from contextlib import contextmanager from decimal import Decimal from io import BytesIO from unittest import TestCase from urllib.request import pathname2url import json import os import sys import tempfile import unittest from twisted.trial.unittest import SynchronousTestCas...
12)
3992d99a74099c99cc02338ecffa5647d0a2bdc4
349
v2_extractor_at_anchor
python-jsonschema/jsonschema
3992d99a74099c99cc02338ecffa5647d0a2bdc4
349
train
train
jsonschema/tests/test_validators.py
test_it_can_construct_a_base_uri_from_a_schema_without_id
self.assertEqual
string_literal
40
from collections import deque, namedtuple from contextlib import contextmanager from decimal import Decimal from io import BytesIO from unittest import TestCase from urllib.request import pathname2url import json import os import sys import tempfile import unittest from twisted.trial.unittest import SynchronousTestCas...
"")
3992d99a74099c99cc02338ecffa5647d0a2bdc4
349
v2_extractor_at_anchor
python-jsonschema/jsonschema
3992d99a74099c99cc02338ecffa5647d0a2bdc4
349
train
train
jsonschema/tests/test_validators.py
test_multiple_nesting
self.assertEqual
string_literal
56
from collections import deque, namedtuple from contextlib import contextmanager from decimal import Decimal from io import BytesIO from unittest import TestCase from urllib.request import pathname2url import json import os import sys import tempfile import unittest from twisted.trial.unittest import SynchronousTestCas...
"$")
3992d99a74099c99cc02338ecffa5647d0a2bdc4
349
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_autoimport.py
test_autoimport_import
assert
numeric_literal
49
from typing import Dict, List from unittest.mock import Mock import jedi import parso import pytest from pylsp import lsp, uris from pylsp.config.config import Config from pylsp.plugins.rope_autoimport import _get_score, _should_insert, get_names from pylsp.plugins.rope_autoimport import \ pylsp_completions as py...
0
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_autoimport.py
test_sort_sources
assert
variable
50
from typing import Dict, List from unittest.mock import Mock import jedi import parso import pytest from pylsp import lsp, uris from pylsp.config.config import Config from pylsp.plugins.rope_autoimport import _get_score, _should_insert, get_names from pylsp.plugins.rope_autoimport import \ pylsp_completions as py...
result2
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_autoimport.py
test_autoimport_pathlib
assert
string_literal
49
from typing import Dict, List from unittest.mock import Mock import jedi import parso import pytest from pylsp import lsp, uris from pylsp.config.config import Config from pylsp.plugins.rope_autoimport import _get_score, _should_insert, get_names from pylsp.plugins.rope_autoimport import \ pylsp_completions as py...
"pathlib"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_autoimport.py
test_autoimport_pathlib
assert
collection
53
from typing import Dict, List from unittest.mock import Mock import jedi import parso import pytest from pylsp import lsp, uris from pylsp.config.config import Config from pylsp.plugins.rope_autoimport import _get_score, _should_insert, get_names from pylsp.plugins.rope_autoimport import \ pylsp_completions as py...
[{ "range": edit_range, "newText": "import pathlib\n" }]
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_autoimport.py
test_get_names
assert
func_call
59
from typing import Dict, List from unittest.mock import Mock import jedi import parso import pytest from pylsp import lsp, uris from pylsp.config.config import Config from pylsp.plugins.rope_autoimport import _get_score, _should_insert, get_names from pylsp.plugins.rope_autoimport import \ pylsp_completions as py...
set( ["blah", "bleh", "e", "hello", "someone", "sfa", "a", "b"])
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_autopep8_format.py
test_format
assert
numeric_literal
43
import pytest from pylsp import uris from pylsp.plugins.autopep8_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """a = 123 def func(): pass """ GOOD_DOC = """A = ['hello', 'world']\n""" INDENTED_DOC = """def foo(): ...
1
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_autopep8_format.py
test_hanging_indentation
assert
variable
44
import pytest from pylsp import uris from pylsp.plugins.autopep8_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """a = 123 def func(): pass """ GOOD_DOC = """A = ['hello', 'world']\n""" INDENTED_DOC = """def foo(): ...
CORRECT_INDENTED_DOC
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_autopep8_format.py
test_format
assert
string_literal
44
import pytest from pylsp import uris from pylsp.plugins.autopep8_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """a = 123 def func(): pass """ GOOD_DOC = """A = ['hello', 'world']\n""" INDENTED_DOC = """def foo(): ...
"a = 123\n\n\ndef func():\n pass\n"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_autopep8_format.py
test_range_format
assert
string_literal
51
import pytest from pylsp import uris from pylsp.plugins.autopep8_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """a = 123 def func(): pass """ GOOD_DOC = """A = ['hello', 'world']\n""" INDENTED_DOC = """def foo(): ...
"a = 123\n\n\n\n\ndef func():\n pass\n"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_autopep8_format.py
test_line_endings
assert
string_literal
44
import pytest from pylsp import uris from pylsp.plugins.autopep8_format import pylsp_format_document, pylsp_format_range from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """a = 123 def func(): pass """ GOOD_DOC = """A = ['hello', 'world']\n""" INDENTED_DOC = """def foo(): ...
f'import os{newline}import sys{2 * newline}dict(a=1){newline}'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_completion_with_class_objects
assert
numeric_literal
63
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
2
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_snippet_parsing
assert
variable
64
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
out
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_rope_import_completion
assert
none_literal
56
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
None
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_jedi_completion
assert
variable
60
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
labels
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_multiline_import_snippets
assert
string_literal
61
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
'date'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_rope_completion
assert
string_literal
60
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
'isabs'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_document_path_completions
assert
string_literal
72
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
'foo()'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_jedi_completion_with_fuzzy_enabled
assert
variable
65
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
expected
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_completion_with_class_objects
assert
string_literal
65
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
'FOOBAR'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_jedi_completion_extra_paths
assert
string_literal
80
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
'spam()'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_jedi_completion_environment
assert
string_literal
76
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
'loghub'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_completion.py
test_jedi_method_completion
assert
string_literal
74
import math import os import sys from pathlib import Path from typing import NamedTuple, Dict import pytest from pylsp import uris, lsp from pylsp.workspace import Document from pylsp.plugins.jedi_completion import pylsp_completions as pylsp_jedi_completions from pylsp.plugins.jedi_completion import pylsp_completion...
'everyone'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_definitions.py
test_definitions
assert
func_call
34
import os from pylsp import uris from pylsp.plugins.definition import pylsp_definitions from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """def a(): pass print a() class Directory(object): def __init__(self): self.members = dict() def add_member(self, id, name):...
pylsp_definitions(config, workspace, doc, cursor_pos)
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_definitions.py
test_document_path_definitions
assert
func_call
53
import os from pylsp import uris from pylsp.plugins.definition import pylsp_definitions from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """def a(): pass print a() class Directory(object): def __init__(self): self.members = dict() def add_member(self, id, name):...
pylsp_definitions( config, workspace_other_root_path, doc, cursor_pos )
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_flake8_lint.py
test_flake8_multiline
assert
numeric_literal
56
import tempfile import os from textwrap import dedent from unittest.mock import patch from pylsp import lsp, uris from pylsp.plugins import flake8_lint from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pylsp t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_d...
2
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_flake8_lint.py
test_flake8_unsaved
assert
string_literal
35
import tempfile import os from textwrap import dedent from unittest.mock import patch from pylsp import lsp, uris from pylsp.plugins import flake8_lint from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pylsp t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_d...
'F841'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_flake8_lint.py
test_flake8_unsaved
assert
string_literal
34
import tempfile import os from textwrap import dedent from unittest.mock import patch from pylsp import lsp, uris from pylsp.plugins import flake8_lint from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pylsp t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_d...
'flake8'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_flake8_lint.py
test_flake8_config_param
assert
variable
37
import tempfile import os from textwrap import dedent from unittest.mock import patch from pylsp import lsp, uris from pylsp.plugins import flake8_lint from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pylsp t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_d...
call_args
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_flake8_lint.py
test_flake8_multiline
assert
variable
55
import tempfile import os from textwrap import dedent from unittest.mock import patch from pylsp import lsp, uris from pylsp.plugins import flake8_lint from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pylsp t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_d...
flake8_settings
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_flake8_lint.py
test_flake8_unsaved
assert
collection
36
import tempfile import os from textwrap import dedent from unittest.mock import patch from pylsp import lsp, uris from pylsp.plugins import flake8_lint from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pylsp t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_d...
{'line': 5, 'character': 1}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_flake8_lint.py
test_flake8_unsaved
assert
collection
37
import tempfile import os from textwrap import dedent from unittest.mock import patch from pylsp import lsp, uris from pylsp.plugins import flake8_lint from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pylsp t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_d...
{'line': 5, 'character': 11}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_flake8_lint.py
test_flake8_unsaved
assert
complex_expr
38
import tempfile import os from textwrap import dedent from unittest.mock import patch from pylsp import lsp, uris from pylsp.plugins import flake8_lint from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pylsp t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_d...
lsp.DiagnosticSeverity.Error
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_folding.py
test_folding
assert
variable
151
import sys from textwrap import dedent from pylsp import uris from pylsp.plugins.folding import pylsp_folding_range from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = dedent(""" def func(arg1, arg2, arg3, arg4, arg5, default=func( 2, 3, 4 )): return (2,...
expected
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_highlight.py
test_sys_highlight
assert
collection
15
from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins.highlight import pylsp_document_highlight DOC_URI = uris.from_fs_path(__file__) DOC = """a = "hello" a.startswith("b") """ def test_sys_highlight(workspace): cursor_pos = {'line': 0, 'character': 8} doc = Document(DOC_URI, wo...
[{ 'range': { 'start': {'line': 0, 'character': 7}, 'end': {'line': 0, 'character': 10} }, 'kind': lsp.DocumentHighlightKind.Write }, { 'range': { 'start': {'line': 1, 'character': 6}, 'end': {'line': 1, 'character': 9} }, 'kind': lsp.DocumentHighlightKind.Read }]
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_highlight.py
test_highlight
assert
collection
16
from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins.highlight import pylsp_document_highlight DOC_URI = uris.from_fs_path(__file__) DOC = """a = "hello" a.startswith("b") """ def test_highlight(workspace): # Over 'a' in a.startswith cursor_pos = {'line': 1, 'character': 0} ...
[{ 'range': { 'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 1}, }, # The first usage is Write 'kind': lsp.DocumentHighlightKind.Write }, { 'range': { 'start': {'line': 1, 'character': 0}, 'end': {'line': 1, 'character': 1}, }, # The second usage is Read 'kind': lsp.DocumentHighlightKind.Read }]
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_hover.py
test_document_path_hover
assert
complex_expr
45
import os from pylsp import uris from pylsp.plugins.hover import pylsp_hover from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """ def main(): \"\"\"hello world\"\"\" pass """ NUMPY_DOC = """ import numpy as np np.sin """ def test_document_path_hover(workspace_other_root_pa...
contents['value']
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_hover.py
test_hover
assert
func_call
33
import os from pylsp import uris from pylsp.plugins.hover import pylsp_hover from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """ def main(): \"\"\"hello world\"\"\" pass """ NUMPY_DOC = """ import numpy as np np.sin """ def test_hover(workspace): # Over 'main' in def ...
pylsp_hover(doc._config, doc, hov_position)
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_hover.py
test_hover
assert
func_call
37
import os from pylsp import uris from pylsp.plugins.hover import pylsp_hover from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """ def main(): \"\"\"hello world\"\"\" pass """ NUMPY_DOC = """ import numpy as np np.sin """ def test_hover(workspace): # Over 'main' in def ...
pylsp_hover(doc._config, doc, no_hov_position)
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_hover.py
test_numpy_hover
assert
func_call
38
import os from pylsp import uris from pylsp.plugins.hover import pylsp_hover from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """ def main(): \"\"\"hello world\"\"\" pass """ NUMPY_DOC = """ import numpy as np np.sin """ def test_numpy_hover(workspace): # Over the blan...
pylsp_hover(doc._config, doc, no_hov_position)['contents']
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_hover.py
test_numpy_hover
assert
func_call
41
import os from pylsp import uris from pylsp.plugins.hover import pylsp_hover from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """ def main(): \"\"\"hello world\"\"\" pass """ NUMPY_DOC = """ import numpy as np np.sin """ def test_numpy_hover(workspace): # Over the blan...
pylsp_hover(doc._config, doc, numpy_hov_position_1)['contents']['value']
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_hover.py
test_numpy_hover
assert
func_call
44
import os from pylsp import uris from pylsp.plugins.hover import pylsp_hover from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """ def main(): \"\"\"hello world\"\"\" pass """ NUMPY_DOC = """ import numpy as np np.sin """ def test_numpy_hover(workspace): # Over the blan...
pylsp_hover(doc._config, doc, numpy_hov_position_2)['contents']['value']
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_hover.py
test_numpy_hover
assert
func_call
47
import os from pylsp import uris from pylsp.plugins.hover import pylsp_hover from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """ def main(): \"\"\"hello world\"\"\" pass """ NUMPY_DOC = """ import numpy as np np.sin """ def test_numpy_hover(workspace): # Over the blan...
pylsp_hover(doc._config, doc, numpy_hov_position_3)['contents']['value']
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_hover.py
test_numpy_hover
assert
func_call
55
import os from pylsp import uris from pylsp.plugins.hover import pylsp_hover from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """ def main(): \"\"\"hello world\"\"\" pass """ NUMPY_DOC = """ import numpy as np np.sin """ def test_numpy_hover(workspace): # Over the blan...
pylsp_hover(doc._config, doc, numpy_sin_hov_position)['contents']['value']
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_jedi_rename.py
test_jedi_rename
assert
numeric_literal
39
import os import sys import pytest from pylsp import uris from pylsp.plugins.jedi_rename import pylsp_rename from pylsp.workspace import Document LT_PY36 = sys.version_info.major < 3 or (sys.version_info.major == 3 and sys.version_info.minor < 6) DOC_NAME = 'test1.py' DOC = '''class Test1(): pass class Test2(Te...
1
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_jedi_rename.py
test_jedi_rename
assert
numeric_literal
42
import os import sys import pytest from pylsp import uris from pylsp.plugins.jedi_rename import pylsp_rename from pylsp.workspace import Document LT_PY36 = sys.version_info.major < 3 or (sys.version_info.major == 3 and sys.version_info.minor < 6) DOC_NAME = 'test1.py' DOC = '''class Test1(): pass class Test2(Te...
2
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_jedi_rename.py
test_jedi_rename
assert
none_literal
61
import os import sys import pytest from pylsp import uris from pylsp.plugins.jedi_rename import pylsp_rename from pylsp.workspace import Document LT_PY36 = sys.version_info.major < 3 or (sys.version_info.major == 3 and sys.version_info.minor < 6) DOC_NAME = 'test1.py' DOC = '''class Test1(): pass class Test2(Te...
None
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_jedi_rename.py
test_jedi_rename
assert
complex_expr
44
import os import sys import pytest from pylsp import uris from pylsp.plugins.jedi_rename import pylsp_rename from pylsp.workspace import Document LT_PY36 = sys.version_info.major < 3 or (sys.version_info.major == 3 and sys.version_info.minor < 6) DOC_NAME = 'test1.py' DOC = '''class Test1(): pass class Test2(Te...
doc.uri
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_jedi_rename.py
test_jedi_rename
assert
variable
57
import os import sys import pytest from pylsp import uris from pylsp.plugins.jedi_rename import pylsp_rename from pylsp.workspace import Document LT_PY36 = sys.version_info.major < 3 or (sys.version_info.major == 3 and sys.version_info.minor < 6) DOC_NAME = 'test1.py' DOC = '''class Test1(): pass class Test2(Te...
uri_extra
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_mccabe_lint.py
test_mccabe_syntax_error
assert
none_literal
16
from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import mccabe_lint DOC_URI = uris.from_fs_path(__file__) DOC = """def hello(): \tpass """ DOC_SYNTAX_ERR = """def hello() \tpass""" def test_mccabe_syntax_error(config, workspace): doc = Document(DOC_URI, workspace, DOC_SYNTAX_ER...
None
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_mccabe_lint.py
test_mccabe
assert
collection
28
from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import mccabe_lint DOC_URI = uris.from_fs_path(__file__) DOC = """def hello(): \tpass """ DOC_SYNTAX_ERR = """def hello() \tpass""" def test_mccabe(config, workspace): old_settings = config.settings try: config.update...
{'line': 0, 'character': 0}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_mccabe_lint.py
test_mccabe
assert
collection
29
from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import mccabe_lint DOC_URI = uris.from_fs_path(__file__) DOC = """def hello(): \tpass """ DOC_SYNTAX_ERR = """def hello() \tpass""" def test_mccabe(config, workspace): old_settings = config.settings try: config.update...
{'line': 0, 'character': 6}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_mccabe_lint.py
test_mccabe
assert
complex_expr
27
from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import mccabe_lint DOC_URI = uris.from_fs_path(__file__) DOC = """def hello(): \tpass """ DOC_SYNTAX_ERR = """def hello() \tpass""" def test_mccabe(config, workspace): old_settings = config.settings try: config.update...
lsp.DiagnosticSeverity.Warning
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pycodestyle_lint.py
test_line_endings
assert
numeric_literal
40
import os import pytest from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pycodestyle_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello( ): \tpass print("hello" ,"world" ) import json """ @pytest.mark.parametrize('newline', ['\r\n', '\r']) def tes...
0
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle
assert
string_literal
34
import os import pytest from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pycodestyle_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello( ): \tpass print("hello" ,"world" ) import json """ def test_pycodestyle(workspace): doc = Document(DOC_URI...
'W191'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle
assert
string_literal
42
import os import pytest from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pycodestyle_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello( ): \tpass print("hello" ,"world" ) import json """ def test_pycodestyle(workspace): doc = Document(DOC_URI...
'W391'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle
assert
string_literal
50
import os import pytest from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pycodestyle_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello( ): \tpass print("hello" ,"world" ) import json """ def test_pycodestyle(workspace): doc = Document(DOC_URI...
'E201'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle
assert
string_literal
58
import os import pytest from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pycodestyle_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello( ): \tpass print("hello" ,"world" ) import json """ def test_pycodestyle(workspace): doc = Document(DOC_URI...
'E128'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle_config
assert
complex_expr
60
import os import pytest from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pycodestyle_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello( ): \tpass print("hello" ,"world" ) import json """ def test_pycodestyle_config(workspace): """ Test that w...
0 if working else 1
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle
assert
collection
36
import os import pytest from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pycodestyle_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello( ): \tpass print("hello" ,"world" ) import json """ def test_pycodestyle(workspace): doc = Document(DOC_URI...
{'line': 3, 'character': 0}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pydocstyle_lint.py
test_pydocstyle_empty_source
assert
numeric_literal
22
import os from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pydocstyle_lint DOC_URI = uris.from_fs_path(os.path.join(os.path.dirname(__file__), "pydocstyle.py")) TEST_DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ def test_pydo...
1
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pydocstyle_lint.py
test_pydocstyle_empty_source
assert
string_literal
21
import os from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pydocstyle_lint DOC_URI = uris.from_fs_path(os.path.join(os.path.dirname(__file__), "pydocstyle.py")) TEST_DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ def test_pydo...
'D100: Missing docstring in public module'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pydocstyle_lint.py
test_pydocstyle
assert
collection
25
import os from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pydocstyle_lint DOC_URI = uris.from_fs_path(os.path.join(os.path.dirname(__file__), "pydocstyle.py")) TEST_DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ def test_pydo...
{ 'code': 'D100', 'message': 'D100: Missing docstring in public module', 'severity': lsp.DiagnosticSeverity.Warning, 'range': { 'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 11}, }, 'source': 'pydocstyle' }
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pyflakes_lint.py
test_unicode_encoding
assert
numeric_literal
31
import sys from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pyflakes_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ DOC_UNDEFINED_NAME_ERR = "a = b" DOC_ENCODING = """# encod...
1
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pyflakes_lint.py
test_syntax_error_pyflakes
assert
string_literal
32
import sys from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pyflakes_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ DOC_UNDEFINED_NAME_ERR = "a = b" DOC_ENCODING = """# encod...
"expected ':'"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pyflakes_lint.py
test_syntax_error_pyflakes
assert
string_literal
34
import sys from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pyflakes_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ DOC_UNDEFINED_NAME_ERR = "a = b" DOC_ENCODING = """# encod...
'invalid syntax'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pyflakes_lint.py
test_undefined_name_pyflakes
assert
string_literal
31
import sys from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pyflakes_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ DOC_UNDEFINED_NAME_ERR = "a = b" DOC_ENCODING = """# encod...
'undefined name \'b\''
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pyflakes_lint.py
test_pyflakes
assert
collection
35
import sys from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pyflakes_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ DOC_UNDEFINED_NAME_ERR = "a = b" DOC_ENCODING = """# encod...
{'line': 0, 'character': 0}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pyflakes_lint.py
test_undefined_name_pyflakes
assert
collection
32
import sys from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pyflakes_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ DOC_UNDEFINED_NAME_ERR = "a = b" DOC_ENCODING = """# encod...
{'line': 0, 'character': 4}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pyflakes_lint.py
test_syntax_error_pyflakes
assert
collection
35
import sys from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pyflakes_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ DOC_UNDEFINED_NAME_ERR = "a = b" DOC_ENCODING = """# encod...
{'line': 0, 'character': 12}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pyflakes_lint.py
test_syntax_error_pyflakes
assert
complex_expr
36
import sys from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pyflakes_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ DOC_UNDEFINED_NAME_ERR = "a = b" DOC_ENCODING = """# encod...
lsp.DiagnosticSeverity.Error
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pyflakes_lint.py
test_unicode_encoding
assert
string_literal
32
import sys from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pyflakes_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ DOC_UNDEFINED_NAME_ERR = "a = b" DOC_ENCODING = """# encod...
'\'sys\' imported but unused'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pyflakes_lint.py
test_pyflakes
assert
complex_expr
36
import sys from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pyflakes_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ DOC_UNDEFINED_NAME_ERR = "a = b" DOC_ENCODING = """# encod...
lsp.DiagnosticSeverity.Warning
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pylint_lint.py
test_syntax_error_pylint
assert
variable
45
import contextlib import os import tempfile from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pylint_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ def temp_document(doc_text, ...
diag
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pylint_lint.py
test_lint_caching
assert
variable
55
import contextlib import os import tempfile from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pylint_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ def temp_document(doc_text, ...
diags
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pylint_lint.py
test_pylint
assert
collection
43
import contextlib import os import tempfile from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pylint_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ def temp_document(doc_text, ...
{'line': 0, 'character': 0}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pylint_lint.py
test_syntax_error_pylint
assert
collection
43
import contextlib import os import tempfile from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pylint_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ def temp_document(doc_text, ...
{'line': 0, 'character': 12}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pylint_lint.py
test_syntax_error_pylint
assert
complex_expr
44
import contextlib import os import tempfile from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pylint_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ def temp_document(doc_text, ...
lsp.DiagnosticSeverity.Error
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pylint_lint.py
test_pylint
assert
complex_expr
44
import contextlib import os import tempfile from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pylint_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ def temp_document(doc_text, ...
lsp.DiagnosticSeverity.Warning
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pylint_lint.py
test_pylint
assert
collection
45
import contextlib import os import tempfile from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pylint_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ def temp_document(doc_text, ...
[lsp.DiagnosticTag.Unnecessary]
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_pylint_lint.py
test_pylint
assert
collection
54
import contextlib import os import tempfile from pylsp import lsp, uris from pylsp.workspace import Document from pylsp.plugins import pylint_lint DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def hello(): \tpass import json """ DOC_SYNTAX_ERR = """def hello() pass """ def temp_document(doc_text, ...
{ 'line': 0, 'character': 0, }
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_references.py
test_references
assert
numeric_literal
40
import os import pytest from pylsp import uris from pylsp.workspace import Document from pylsp.plugins.references import pylsp_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tm...
3
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_references.py
test_references
assert
numeric_literal
44
import os import pytest from pylsp import uris from pylsp.workspace import Document from pylsp.plugins.references import pylsp_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tm...
1
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_references.py
test_references_builtin
assert
variable
43
import os import pytest from pylsp import uris from pylsp.workspace import Document from pylsp.plugins.references import pylsp_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tm...
ranges
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_references.py
test_references
assert
collection
48
import os import pytest from pylsp import uris from pylsp.workspace import Document from pylsp.plugins.references import pylsp_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tm...
{'line': 0, 'character': 6}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_references.py
test_references
assert
collection
57
import os import pytest from pylsp import uris from pylsp.workspace import Document from pylsp.plugins.references import pylsp_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tm...
{'line': 3, 'character': 4}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_references.py
test_references
assert
collection
58
import os import pytest from pylsp import uris from pylsp.workspace import Document from pylsp.plugins.references import pylsp_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tm...
{'line': 3, 'character': 9}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_rope_rename.py
test_rope_rename
assert
numeric_literal
26
import os import pytest from pylsp import uris from pylsp.plugins.rope_rename import pylsp_rename from pylsp.workspace import Document DOC_NAME = "test1.py" DOC = """class Test1(): pass class Test2(Test1): pass """ def tmp_workspace(temp_workspace_factory): return temp_workspace_factory({DOC_NAME: DOC})...
1
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_rope_rename.py
test_rope_rename
assert
collection
34
import os import pytest from pylsp import uris from pylsp.plugins.rope_rename import pylsp_rename from pylsp.workspace import Document DOC_NAME = "test1.py" DOC = """class Test1(): pass class Test2(Test1): pass """ def tmp_workspace(temp_workspace_factory): return temp_workspace_factory({DOC_NAME: DOC})...
[ { "range": { "start": {"line": 0, "character": 0}, "end": {"line": 5, "character": 0}, }, "newText": "class ShouldBeRenamed():\n pass\n\nclass Test2(ShouldBeRenamed):\n pass\n", } ]
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_signature.py
test_signature
assert
numeric_literal
49
import pytest from pylsp import uris from pylsp.plugins import signature from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def main(param1, param2): \"\"\" Main docstring Args: param1 (str): Docs for param1 \"\"\" raise Exception() main( """ MULT...
1
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_signature.py
test_signature
assert
numeric_literal
54
import pytest from pylsp import uris from pylsp.plugins import signature from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def main(param1, param2): \"\"\" Main docstring Args: param1 (str): Docs for param1 \"\"\" raise Exception() main( """ MULT...
0
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_signature.py
test_docstring_params
assert
string_literal
48
import pytest from pylsp import uris from pylsp.plugins import signature from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def main(param1, param2): \"\"\" Main docstring Args: param1 (str): Docs for param1 \"\"\" raise Exception() main( """ MULT...
"test"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_signature.py
test_signature
assert
string_literal
51
import pytest from pylsp import uris from pylsp.plugins import signature from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def main(param1, param2): \"\"\" Main docstring Args: param1 (str): Docs for param1 \"\"\" raise Exception() main( """ MULT...
'param1'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_signature.py
test_docstring_params
assert
string_literal
49
import pytest from pylsp import uris from pylsp.plugins import signature from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def main(param1, param2): \"\"\" Main docstring Args: param1 (str): Docs for param1 \"\"\" raise Exception() main( """ MULT...
"parameter docstring"
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_signature.py
test_signature
assert
string_literal
50
import pytest from pylsp import uris from pylsp.plugins import signature from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def main(param1, param2): \"\"\" Main docstring Args: param1 (str): Docs for param1 \"\"\" raise Exception() main( """ MULT...
'main(param1, param2)'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_signature.py
test_signature
assert
collection
52
import pytest from pylsp import uris from pylsp.plugins import signature from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def main(param1, param2): \"\"\" Main docstring Args: param1 (str): Docs for param1 \"\"\" raise Exception() main( """ MULT...
{'kind': 'markdown', 'value': 'Docs for param1'}
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor
python-lsp/python-lsp-server
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
train
train
test/plugins/test_signature.py
test_multi_line_signature
assert
string_literal
50
import pytest from pylsp import uris from pylsp.plugins import signature from pylsp.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import sys def main(param1, param2): \"\"\" Main docstring Args: param1 (str): Docs for param1 \"\"\" raise Exception() main( """ MULT...
'main(param1=None, param2=None, param3=None, param4=None, ' 'param5=None, param6=None, param7=None, param8=None)'
a79c171da640edc2f0a0c7025b05fd7c37f733c4
165
v2_extractor_at_anchor