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
pajbot/pajbot
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
train
train
pajbot/tests/test_split_into_chunks_with_prefix.py
test_basic
assert
variable
13
from __future__ import annotations from typing import List from pajbot.utils import split_into_chunks_with_prefix import pytest def test_basic() -> None: expected = ["TEST: 1 2 3 4"] actual = split_into_chunks_with_prefix([{"prefix": "TEST:", "parts": ["1", "2", "3", "4"]}]) assert actual ==
expected
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
v2_extractor_at_anchor
pajbot/pajbot
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
train
train
pajbot/tests/test_split_into_chunks_with_prefix.py
test_impossible_throws_exception
pytest.raises
variable
12
from __future__ import annotations from typing import List from pajbot.utils import split_into_chunks_with_prefix import pytest def test_impossible_throws_exception() -> None: # not possible to fit this into one message of 30 length with pytest.raises(
ValueError)
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
v2_extractor_at_anchor
pajbot/pajbot
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
train
train
pajbot/tests/test_url_parser.py
test_find_unique_urls
assert
func_call
29
def test_find_unique_urls() -> None: from pajbot.modules.linkchecker import find_unique_urls assert find_unique_urls("pajlada.se test http://pajlada.se") == {"http://pajlada.se"} assert find_unique_urls("pajlada.se pajlada.com foobar.se") == { "http://pajlada.se", "http://pajlada.com", ...
set()
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
v2_extractor_at_anchor
pajbot/pajbot
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
train
train
pajbot/tests/test_url_parser.py
test_find_unique_urls
assert
collection
5
def test_find_unique_urls() -> None: from pajbot.modules.linkchecker import find_unique_urls assert find_unique_urls("pajlada.se test http://pajlada.se") ==
{"http://pajlada.se"}
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
v2_extractor_at_anchor
pajbot/pajbot
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
train
train
pajbot/tests/test_url_parser.py
test_find_unique_urls
assert
collection
11
def test_find_unique_urls() -> None: from pajbot.modules.linkchecker import find_unique_urls assert find_unique_urls("pajlada.se test http://pajlada.se") == {"http://pajlada.se"} assert find_unique_urls("pajlada.se pajlada.com foobar.se") == { "http://pajlada.se", "http://pajlada.com", ...
{"http://foobar.com"}
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
v2_extractor_at_anchor
pajbot/pajbot
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
train
train
pajbot/tests/test_url_parser.py
test_find_unique_urls
assert
collection
25
def test_find_unique_urls() -> None: from pajbot.modules.linkchecker import find_unique_urls assert find_unique_urls("pajlada.se test http://pajlada.se") == {"http://pajlada.se"} assert find_unique_urls("pajlada.se pajlada.com foobar.se") == { "http://pajlada.se", "http://pajlada.com", ...
{ "http://192.168.0.1", }
aa8dc95e5ac2f14ad90109ea7880d6c4ce6f431d
34
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_autopep8_format.py
test_format
assert
numeric_literal
22
from pyls import uris from pyls.plugins.autopep8_format import pyls_format_document, pyls_format_range from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """a = 123 def func(): pass """ GOOD_DOC = """A = ['hello', 'world']\n""" def test_format(config): doc = Document(DOC_U...
1
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_autopep8_format.py
test_format
assert
string_literal
23
from pyls import uris from pyls.plugins.autopep8_format import pyls_format_document, pyls_format_range from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """a = 123 def func(): pass """ GOOD_DOC = """A = ['hello', 'world']\n""" def test_format(config): doc = Document(DOC_U...
"a = 123\n\n\ndef func():\n pass\n"
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_autopep8_format.py
test_range_format
assert
string_literal
30
from pyls import uris from pyls.plugins.autopep8_format import pyls_format_document, pyls_format_range from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """a = 123 def func(): pass """ GOOD_DOC = """A = ['hello', 'world']\n""" def test_range_format(config): doc = Document...
"a = 123\n\n\n\n\ndef func():\n pass\n"
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_snippets_completion
assert
variable
60
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
out
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_rope_import_completion
assert
none_literal
49
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
None
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_multiline_snippets
assert
string_literal
54
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
'date'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_rope_completion
assert
string_literal
53
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
'isabs'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_jedi_completion_extra_paths
assert
string_literal
73
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
'spam()'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_jedi_completion_environment
assert
string_literal
69
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
'loghub'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_jedi_method_completion
assert
string_literal
67
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
'everyone'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_multiline_snippets
assert
string_literal
58
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
'datetime'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_jedi_completion
assert
string_literal
52
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
'isabs(path)'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_snippets_completion
assert
string_literal
55
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
'defaultdict'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_jedi_method_completion
assert
variable
66
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
everyone_method
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_jedi_completion_ordering
assert
func_call
54
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
items['_a_hello()']
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_jedi_property_completion
assert
func_call
54
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
list(items.keys())[0]
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_completion.py
test_jedi_method_completion
assert
complex_expr
57
from distutils.version import LooseVersion import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris, lsp from pyls._utils import JEDI_VERSION from pyls.workspace import Document from pyls.plugins.jedi_completion import pyls_completions as pyls_jedi_completions from pyls.plugi...
lsp.InsertTextFormat.Snippet
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_definitions.py
test_definitions
assert
func_call
32
from pyls import uris from pyls.plugins.definition import pyls_definitions from pyls.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): self.m...
pyls_definitions(config, doc, cursor_pos)
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_flake8_lint.py
test_flake8_no_checked_file
assert
collection
35
import tempfile import os from mock import patch from pyls import lsp, uris from pyls.plugins import flake8_lint from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pyls t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_document(doc_text): temp_file = tempf...
[]
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_flake8_lint.py
test_flake8_lint
assert
string_literal
37
import tempfile import os from mock import patch from pyls import lsp, uris from pyls.plugins import flake8_lint from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pyls t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_document(doc_text): temp_file = tempf...
'F841'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_flake8_lint.py
test_flake8_lint
assert
string_literal
36
import tempfile import os from mock import patch from pyls import lsp, uris from pyls.plugins import flake8_lint from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pyls t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_document(doc_text): temp_file = tempf...
'flake8'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_flake8_lint.py
test_flake8_config_param
assert
variable
36
import tempfile import os from mock import patch from pyls import lsp, uris from pyls.plugins import flake8_lint from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pyls t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_document(doc_text): temp_file = tempf...
call_args
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_flake8_lint.py
test_flake8_lint
assert
collection
38
import tempfile import os from mock import patch from pyls import lsp, uris from pyls.plugins import flake8_lint from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pyls t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_document(doc_text): temp_file = tempf...
{'line': 5, 'character': 1}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_flake8_lint.py
test_flake8_lint
assert
collection
39
import tempfile import os from mock import patch from pyls import lsp, uris from pyls.plugins import flake8_lint from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pyls t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_document(doc_text): temp_file = tempf...
{'line': 5, 'character': 11}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_flake8_lint.py
test_flake8_lint
assert
complex_expr
40
import tempfile import os from mock import patch from pyls import lsp, uris from pyls.plugins import flake8_lint from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """import pyls t = "TEST" def using_const(): \ta = 8 + 9 \treturn t """ def temp_document(doc_text): temp_file = tempf...
lsp.DiagnosticSeverity.Warning
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_folding.py
test_folding
assert
variable
142
from textwrap import dedent from pyls import uris from pyls.workspace import Document from pyls.plugins.folding import pyls_folding_range DOC_URI = uris.from_fs_path(__file__) DOC = dedent(""" def func(arg1, arg2, arg3, arg4, arg5, default=func( 2, 3, 4 )): return (2, 3, ...
expected
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_highlight.py
test_sys_highlight
assert
collection
15
from pyls import lsp, uris from pyls.workspace import Document from pyls.plugins.highlight import pyls_document_highlight DOC_URI = uris.from_fs_path(__file__) DOC = """a = "hello" a.startswith("b") """ def test_sys_highlight(): cursor_pos = {'line': 0, 'character': 8} doc = Document(DOC_URI, SYS_DOC) a...
[{ '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 }]
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_highlight.py
test_highlight
assert
collection
16
from pyls import lsp, uris from pyls.workspace import Document from pyls.plugins.highlight import pyls_document_highlight DOC_URI = uris.from_fs_path(__file__) DOC = """a = "hello" a.startswith("b") """ def test_highlight(): # Over 'a' in a.startswith cursor_pos = {'line': 1, 'character': 0} doc = Docume...
[{ '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 }]
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_hover.py
test_hover
assert
func_call
29
from distutils.version import LooseVersion from pyls import uris, _utils from pyls.plugins.hover import pyls_hover from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """ def main(): \"\"\"hello world\"\"\" pass """ def test_hover(): # Over 'main' in def main(): hov_posit...
pyls_hover(doc, hov_position)
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_hover.py
test_hover
assert
func_call
33
from distutils.version import LooseVersion from pyls import uris, _utils from pyls.plugins.hover import pyls_hover from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """ def main(): \"\"\"hello world\"\"\" pass """ def test_hover(): # Over 'main' in def main(): hov_posit...
pyls_hover(doc, no_hov_position)
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_mccabe_lint.py
test_mccabe_syntax_error
assert
none_literal
16
from pyls import lsp, uris from pyls.workspace import Document from pyls.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): doc = Document(DOC_URI, DOC_SYNTAX_ERR) assert mccabe_lin...
None
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_mccabe_lint.py
test_mccabe
assert
collection
28
from pyls import lsp, uris from pyls.workspace import Document from pyls.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): old_settings = config.settings try: config.update({'plugins': {...
{'line': 0, 'character': 0}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_mccabe_lint.py
test_mccabe
assert
collection
29
from pyls import lsp, uris from pyls.workspace import Document from pyls.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): old_settings = config.settings try: config.update({'plugins': {...
{'line': 0, 'character': 6}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_mccabe_lint.py
test_mccabe
assert
complex_expr
27
from pyls import lsp, uris from pyls.workspace import Document from pyls.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): old_settings = config.settings try: config.update({'plugins': {...
lsp.DiagnosticSeverity.Warning
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle
assert
string_literal
32
import os from pyls import lsp, uris from pyls.config.config import Config from pyls.workspace import Document from pyls.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): doc = ...
'W191'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle
assert
string_literal
40
import os from pyls import lsp, uris from pyls.config.config import Config from pyls.workspace import Document from pyls.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): doc = ...
'W391'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle
assert
string_literal
48
import os from pyls import lsp, uris from pyls.config.config import Config from pyls.workspace import Document from pyls.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): doc = ...
'E201'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle
assert
string_literal
56
import os from pyls import lsp, uris from pyls.config.config import Config from pyls.workspace import Document from pyls.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): doc = ...
'E128'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle_config
assert
complex_expr
59
import os from pyls import lsp, uris from pyls.config.config import Config from pyls.workspace import Document from pyls.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): ...
0 if working else 1
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pycodestyle_lint.py
test_pycodestyle
assert
collection
34
import os from pyls import lsp, uris from pyls.config.config import Config from pyls.workspace import Document from pyls.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): doc = ...
{'line': 3, 'character': 0}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pydocstyle_lint.py
test_pydocstyle_empty_source
assert
numeric_literal
22
import os from pyls import lsp, uris from pyls.workspace import Document from pyls.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_pydocst...
1
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pydocstyle_lint.py
test_pydocstyle_empty_source
assert
string_literal
21
import os from pyls import lsp, uris from pyls.workspace import Document from pyls.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_pydocst...
'D100: Missing docstring in public module'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pydocstyle_lint.py
test_pydocstyle
assert
collection
25
import os from pyls import lsp, uris from pyls.workspace import Document from pyls.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_pydocst...
{ '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' }
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pyflakes_lint.py
test_unicode_encoding
assert
numeric_literal
29
from pyls import lsp, uris from pyls.workspace import Document from pyls.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 = u"""# encoding=utf-8 impo...
1
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pyflakes_lint.py
test_syntax_error_pyflakes
assert
string_literal
29
from pyls import lsp, uris from pyls.workspace import Document from pyls.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 = u"""# encoding=utf-8 impo...
'invalid syntax'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pyflakes_lint.py
test_undefined_name_pyflakes
assert
string_literal
29
from pyls import lsp, uris from pyls.workspace import Document from pyls.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 = u"""# encoding=utf-8 impo...
'undefined name \'b\''
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pyflakes_lint.py
test_pyflakes
assert
collection
33
from pyls import lsp, uris from pyls.workspace import Document from pyls.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 = u"""# encoding=utf-8 impo...
{'line': 0, 'character': 0}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pyflakes_lint.py
test_undefined_name_pyflakes
assert
collection
30
from pyls import lsp, uris from pyls.workspace import Document from pyls.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 = u"""# encoding=utf-8 impo...
{'line': 0, 'character': 4}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pyflakes_lint.py
test_syntax_error_pyflakes
assert
collection
30
from pyls import lsp, uris from pyls.workspace import Document from pyls.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 = u"""# encoding=utf-8 impo...
{'line': 0, 'character': 12}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pyflakes_lint.py
test_syntax_error_pyflakes
assert
complex_expr
31
from pyls import lsp, uris from pyls.workspace import Document from pyls.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 = u"""# encoding=utf-8 impo...
lsp.DiagnosticSeverity.Error
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pyflakes_lint.py
test_unicode_encoding
assert
string_literal
30
from pyls import lsp, uris from pyls.workspace import Document from pyls.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 = u"""# encoding=utf-8 impo...
'\'sys\' imported but unused'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pyflakes_lint.py
test_pyflakes
assert
complex_expr
34
from pyls import lsp, uris from pyls.workspace import Document from pyls.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 = u"""# encoding=utf-8 impo...
lsp.DiagnosticSeverity.Warning
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pylint_lint.py
test_lint_caching
assert
variable
57
import contextlib import os import tempfile from test import py2_only, py3_only from pyls import lsp, uris from pyls.workspace import Document from pyls.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 ...
diags
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pylint_lint.py
test_pylint
assert
collection
45
import contextlib import os import tempfile from test import py2_only, py3_only from pyls import lsp, uris from pyls.workspace import Document from pyls.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 ...
{'line': 0, 'character': 0}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pylint_lint.py
test_syntax_error_pylint_py3
assert
collection
45
import contextlib import os import tempfile from test import py2_only, py3_only from pyls import lsp, uris from pyls.workspace import Document from pyls.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 ...
{'line': 0, 'character': 12}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pylint_lint.py
test_syntax_error_pylint_py3
assert
complex_expr
46
import contextlib import os import tempfile from test import py2_only, py3_only from pyls import lsp, uris from pyls.workspace import Document from pyls.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 ...
lsp.DiagnosticSeverity.Error
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_pylint_lint.py
test_pylint
assert
complex_expr
46
import contextlib import os import tempfile from test import py2_only, py3_only from pyls import lsp, uris from pyls.workspace import Document from pyls.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 ...
lsp.DiagnosticSeverity.Warning
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_references.py
test_references
assert
numeric_literal
44
import os import pytest from pyls import uris from pyls.workspace import Document from pyls.plugins.references import pyls_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tmp_work...
3
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_references.py
test_references
assert
numeric_literal
48
import os import pytest from pyls import uris from pyls.workspace import Document from pyls.plugins.references import pyls_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tmp_work...
1
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_references.py
test_references
assert
collection
52
import os import pytest from pyls import uris from pyls.workspace import Document from pyls.plugins.references import pyls_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tmp_work...
{'line': 0, 'character': 6}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_references.py
test_references
assert
collection
61
import os import pytest from pyls import uris from pyls.workspace import Document from pyls.plugins.references import pyls_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tmp_work...
{'line': 3, 'character': 4}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_references.py
test_references
assert
collection
62
import os import pytest from pyls import uris from pyls.workspace import Document from pyls.plugins.references import pyls_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tmp_work...
{'line': 3, 'character': 9}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_references.py
test_references_builtin
assert
collection
44
import os import pytest from pyls import uris from pyls.workspace import Document from pyls.plugins.references import pyls_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tmp_work...
{'line': 4, 'character': 7}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_references.py
test_references_builtin
assert
collection
45
import os import pytest from pyls import uris from pyls.workspace import Document from pyls.plugins.references import pyls_references DOC1_NAME = 'test1.py' DOC2_NAME = 'test2.py' DOC1 = """class Test1(): pass """ DOC2 = """from test1 import Test1 try: Test1() except UnicodeError: pass """ def tmp_work...
{'line': 4, 'character': 19}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_signature.py
test_signature
assert
numeric_literal
49
import pytest from pyls import uris from pyls.plugins import signature from pyls.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( """ MULTI_L...
1
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_signature.py
test_signature
assert
numeric_literal
54
import pytest from pyls import uris from pyls.plugins import signature from pyls.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( """ MULTI_L...
0
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_signature.py
test_docstring_params
assert
string_literal
48
import pytest from pyls import uris from pyls.plugins import signature from pyls.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( """ MULTI_L...
"test"
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_signature.py
test_signature
assert
string_literal
51
import pytest from pyls import uris from pyls.plugins import signature from pyls.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( """ MULTI_L...
'param1'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_signature.py
test_signature
assert
string_literal
52
import pytest from pyls import uris from pyls.plugins import signature from pyls.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( """ MULTI_L...
'Docs for param1'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_signature.py
test_docstring_params
assert
string_literal
49
import pytest from pyls import uris from pyls.plugins import signature from pyls.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( """ MULTI_L...
"parameter docstring"
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_signature.py
test_signature
assert
string_literal
50
import pytest from pyls import uris from pyls.plugins import signature from pyls.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( """ MULTI_L...
'main(param1, param2)'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_signature.py
test_multi_line_signature
assert
string_literal
50
import pytest from pyls import uris from pyls.plugins import signature from pyls.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( """ MULTI_L...
'main(param1=None, param2=None, param3=None, param4=None, ' 'param5=None, param6=None, param7=None, param8=None)'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_symbols.py
helper_check_symbols_all_scope
assert
numeric_literal
34
import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris from pyls.plugins.symbols import pyls_document_symbols from pyls.lsp import SymbolKind from pyls.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') ...
8
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_symbols.py
test_symbols
assert
numeric_literal
55
import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris from pyls.plugins.symbols import pyls_document_symbols from pyls.lsp import SymbolKind from pyls.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') ...
4
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_symbols.py
helper_check_symbols_all_scope
assert
complex_expr
41
import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris from pyls.plugins.symbols import pyls_document_symbols from pyls.lsp import SymbolKind from pyls.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') ...
SymbolKind.Class
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_symbols.py
helper_check_symbols_all_scope
assert
complex_expr
40
import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris from pyls.plugins.symbols import pyls_document_symbols from pyls.lsp import SymbolKind from pyls.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') ...
SymbolKind.Variable
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_symbols.py
helper_check_symbols_all_scope
assert
complex_expr
42
import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris from pyls.plugins.symbols import pyls_document_symbols from pyls.lsp import SymbolKind from pyls.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') ...
SymbolKind.Function
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_symbols.py
test_symbols
assert
collection
66
import os import sys from test.test_utils import MockWorkspace import pytest from pyls import uris from pyls.plugins.symbols import pyls_document_symbols from pyls.lsp import SymbolKind from pyls.workspace import Document PY2 = sys.version[0] == '2' LINUX = sys.platform.startswith('linux') CI = os.environ.get('CI') ...
{'line': 2, 'character': 0}
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_yapf_format.py
test_format
assert
numeric_literal
25
from pyls import uris from pyls.plugins.yapf_format import pyls_format_document, pyls_format_range from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC = """A = ['hello', 'world']\n""" def test_format(): doc = Doc...
1
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_yapf_format.py
test_format
assert
string_literal
26
from pyls import uris from pyls.plugins.yapf_format import pyls_format_document, pyls_format_range from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC = """A = ['hello', 'world']\n""" def test_format(): doc = Doc...
"A = ['h', 'w', 'a']\n\nB = ['h', 'w']\n"
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_yapf_format.py
test_range_format
assert
string_literal
33
from pyls import uris from pyls.plugins.yapf_format import pyls_format_document, pyls_format_range from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC = """A = ['hello', 'world']\n""" def test_range_format(): doc...
"A = ['h', 'w', 'a']\n\nB = ['h',\n\n\n'w']\n"
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/plugins/test_yapf_format.py
test_config_file
assert
string_literal
29
from pyls import uris from pyls.plugins.yapf_format import pyls_format_document, pyls_format_range from pyls.workspace import Document DOC_URI = uris.from_fs_path(__file__) DOC = """A = [ 'h', 'w', 'a' ] B = ['h', 'w'] """ GOOD_DOC = """A = ['hello', 'world']\n""" def test_config_file(tmpdir): ...
"A = [\n 'h', 'w',\n 'a'\n]\n\nB = ['h', 'w']\n"
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_document_lines
assert
numeric_literal
6
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_document_lines(doc): assert len(doc.lines) ==
4
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_offset_at_position
assert
numeric_literal
6
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_offset_at_position(doc): assert doc.offset_at_position({'line': 0, 'character': 8}) ==
8
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_offset_at_position
assert
numeric_literal
7
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_offset_at_position(doc): assert doc.offset_at_position({'line': 0, 'character': 8}) == 8 assert doc.offset_at_position({'line': 1, 'character': 5}) ==
16
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_offset_at_position
assert
numeric_literal
8
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_offset_at_position(doc): assert doc.offset_at_position({'line': 0, 'character': 8}) == 8 assert doc.offset_at_position({'line': 1, 'character': 5}) == 16 assert doc.offset_at_position({'line': 2, 'character': 0}) ==
12
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_offset_at_position
assert
numeric_literal
10
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_offset_at_position(doc): assert doc.offset_at_position({'line': 0, 'character': 8}) == 8 assert doc.offset_at_position({'line': 1, 'character': 5}) == 16 assert doc.offset_at_position({'line': 2, 'character': 0}) == 12 ...
51
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_word_at_position
assert
string_literal
12
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_word_at_position(doc): """ Return the position under the cursor (or last in line if past the end) """ # import sys assert doc.word_at_position({'line': 0, 'character': 8}) == 'sys' # Past end of import sys assert do...
''
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_document_props
assert
variable
7
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_document_props(doc): assert doc.uri == DOC_URI assert doc.source ==
DOC
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_document_empty_edit
assert
complex_expr
14
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_document_empty_edit(): doc = Document('file:///uri', u'') doc.apply_change({ 'range': { 'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 0} }, 'text': u'f' ...
u'f'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_word_at_position
assert
string_literal
8
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_word_at_position(doc): """ Return the position under the cursor (or last in line if past the end) """ # import sys assert doc.word_at_position({'line': 0, 'character': 8}) ==
'sys'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_word_at_position
assert
string_literal
14
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_word_at_position(doc): """ Return the position under the cursor (or last in line if past the end) """ # import sys assert doc.word_at_position({'line': 0, 'character': 8}) == 'sys' # Past end of import sys assert do...
'def'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_document_props
assert
variable
6
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_document_props(doc): assert doc.uri ==
DOC_URI
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor
palantir/python-language-server
0114c6cdf48010fc1614538a3f229a4992673aa6
99
train
train
test/test_document.py
test_document_lines
assert
string_literal
7
from test.fixtures import DOC_URI, DOC from pyls.workspace import Document def test_document_lines(doc): assert len(doc.lines) == 4 assert doc.lines[0] ==
'import sys\n'
0114c6cdf48010fc1614538a3f229a4992673aa6
99
v2_extractor_at_anchor