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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pycpp/tests/test_transpiler.py | test_declare_vars_inside_if_as_long_as_possible | assert | func_call | 13 | import sys
import textwrap
from pycpp.transpiler import transpile
def parse(*args):
return "\n".join(args)
def test_declare_vars_inside_if_as_long_as_possible():
source = parse("x = 5", "if 10:", " y = 10", " x *= y")
cpp = transpile(source)
assert cpp == | parse("auto x = 5;", "if(10) {", "auto y = 10;", "x *= y;", "}") | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pycpp/tests/test_transpiler.py | test_vector_find_out_type | assert | func_call | 13 | import sys
import textwrap
from pycpp.transpiler import transpile
def parse(*args):
return "\n".join(args)
def test_vector_find_out_type():
source = parse("values = []", "values.append(1)")
cpp = transpile(source)
assert cpp == | parse("std::vector<decltype(1)> values = {};", "values.push_back(1);") | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pycpp/tests/test_transpiler.py | test_tuple_swap | assert | func_call | 13 | import sys
import textwrap
from pycpp.transpiler import transpile
def parse(*args):
return "\n".join(args)
def test_tuple_swap():
source = parse("x = 3", "y = 1", "x, y = y, x")
cpp = transpile(source)
assert cpp == | parse( "auto x = 3;", "auto y = 1;", "std::tie(x, y) = std::make_tuple(y, x);" ) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pycpp/tests/test_transpiler.py | test_create_catch_test_case | assert | func_call | 13 | import sys
import textwrap
from pycpp.transpiler import transpile
def parse(*args):
return "\n".join(args)
def test_create_catch_test_case():
source = parse("def test_fun():", " assert True")
cpp = transpile(source, testing=True)
assert cpp == | parse( '#include "catch.hpp"', 'TEST_CASE("test_fun") {', "REQUIRE(true);", "}" ) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pycpp/tests/test_transpiler.py | test_print_multiple_vars | assert | func_call | 16 | import sys
import textwrap
from pycpp.transpiler import transpile
def parse(*args):
return "\n".join(args)
def test_print_multiple_vars():
if sys.version_info[0] >= 3:
source = parse('print(("hi", "there" ))')
else:
source = parse('print("hi", "there" )')
cpp = transpile(source)
... | parse( 'std::cout << std::string{"hi"} << std::string{"there"};', "std::cout << std::endl;", ) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pycpp/tests/test_transpiler.py | test_augmented_assigns_with_counter | assert | func_call | 15 | import sys
import textwrap
from pycpp.transpiler import transpile
def parse(*args):
return "\n".join(args)
def test_augmented_assigns_with_counter():
source = parse(
"counter = 0", "counter += 5", "counter -= 2", "counter *= 2", "counter /= 3"
)
cpp = transpile(source)
assert cpp == | parse( "auto counter = 0;", "counter += 5;", "counter -= 2;", "counter *= 2;", "counter /= 3;", ) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pycpp/tests/test_transpiler.py | test_declare_var_before_if_else_statements | assert | func_call | 13 | import sys
import textwrap
from pycpp.transpiler import transpile
def parse(*args):
return "\n".join(args)
def test_declare_var_before_if_else_statements():
source = parse("if 10:", " x = True", "else:", " x = False", "y = x")
cpp = transpile(source)
assert cpp == | parse( "decltype(true) x;", "if(10) {", "x = true;", "} else {", "x = false;", "}", "auto y = x;", ) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pycpp/tests/test_transpiler.py | test_print_program_args | assert | func_call | 17 | import sys
import textwrap
from pycpp.transpiler import transpile
def parse(*args):
return "\n".join(args)
def test_print_program_args():
source = parse(
'if __name__ == "__main__":', " for arg in sys.argv:", " print(arg)"
)
cpp = transpile(source)
# Note the args and return type... | parse( "void main() {", "pycpp::sys::argv = std::vector<std::string>(argv, argv + argc);", "for(auto arg : pycpp::sys::argv) {", "std::cout << arg;", "std::cout << std::endl;", "}}", "", ) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_analysis.py | test_nested_functions | assert | numeric_literal | 36 | import ast
from py2many.scope import add_scope_context
from py2many.context import add_variable_context
from py2many.analysis import (
FunctionTransformer,
CalledWithTransformer,
ImportTransformer,
AttributeCallTransformer,
is_void_function,
)
def parse(*args):
source = ast.parse("\n".join(args... | 1 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_analysis.py | test_nested_functions | assert | numeric_literal | 37 | import ast
from py2many.scope import add_scope_context
from py2many.context import add_variable_context
from py2many.analysis import (
FunctionTransformer,
CalledWithTransformer,
ImportTransformer,
AttributeCallTransformer,
is_void_function,
)
def parse(*args):
source = ast.parse("\n".join(args... | 2 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_analysis.py | test_nested_functions | assert | numeric_literal | 38 | import ast
from py2many.scope import add_scope_context
from py2many.context import add_variable_context
from py2many.analysis import (
FunctionTransformer,
CalledWithTransformer,
ImportTransformer,
AttributeCallTransformer,
is_void_function,
)
def parse(*args):
source = ast.parse("\n".join(args... | 0 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_clike.py | test_c_symbol | assert | string_literal | 8 | import ast
from py2many.clike import c_symbol
def test_c_symbol():
source = ast.parse("x == y")
equals_symbol = source.body[0].value.ops[0]
assert c_symbol(equals_symbol) == | "==" | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_context.py | test_call_added | assert | numeric_literal | 16 | import ast
from py2many.context import add_variable_context, add_list_calls
from py2many.scope import add_scope_context
def parse(*args):
source = ast.parse("\n".join(args))
add_scope_context(source)
add_variable_context(source, (source,))
return source
class TestListCallTransformer:
def test_call... | 1 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_context.py | test_vars_of_if | assert | numeric_literal | 16 | import ast
from py2many.context import add_variable_context, add_list_calls
from py2many.scope import add_scope_context
def parse(*args):
source = ast.parse("\n".join(args))
add_scope_context(source)
add_variable_context(source, (source,))
return source
class TestVariableTranformer:
def test_vars_... | 2 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_context.py | test_local_vars_of_function | assert | numeric_literal | 24 | import ast
from py2many.context import add_variable_context, add_list_calls
from py2many.scope import add_scope_context
def parse(*args):
source = ast.parse("\n".join(args))
add_scope_context(source)
add_variable_context(source, (source,))
return source
class TestVariableTranformer:
def test_loca... | 3 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_context.py | test_subscripts_are_ignored | assert | numeric_literal | 16 | import ast
from py2many.context import add_variable_context, add_list_calls
from py2many.scope import add_scope_context
def parse(*args):
source = ast.parse("\n".join(args))
add_scope_context(source)
add_variable_context(source, (source,))
return source
class TestVariableTranformer:
def test_subs... | 0 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_scope.py | test_find_returns_most_upper_definition | assert | numeric_literal | 16 | import ast
from py2many.scope import add_scope_context
from py2many.context import add_variable_context
def parse(*args):
source = ast.parse("\n".join(args))
add_scope_context(source)
return source
class TestScopeList:
def test_find_returns_most_upper_definition(self):
source = parse("x = 1", ... | 1 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_tracer.py | test_direct_assignment | assert | string_literal | 19 | import ast
from py2many.context import add_variable_context, add_list_calls
from py2many.scope import add_scope_context
from py2many.tracer import is_list, is_recursive, value_expr, value_type
def parse(*args):
source = ast.parse("\n".join(args))
add_variable_context(source, (source,))
add_scope_context(s... | "3" | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_tracer.py | test_assign_name | assert | string_literal | 20 | import ast
from py2many.context import add_variable_context, add_list_calls
from py2many.scope import add_scope_context
from py2many.tracer import is_list, is_recursive, value_expr, value_type
def parse(*args):
source = ast.parse("\n".join(args))
add_variable_context(source, (source,))
add_scope_context(s... | "x" | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_tracer.py | test_global_list_assignment_with_later_append | assert | string_literal | 21 | import ast
from py2many.context import add_variable_context, add_list_calls
from py2many.scope import add_scope_context
from py2many.tracer import is_list, is_recursive, value_expr, value_type
def parse(*args):
source = ast.parse("\n".join(args))
add_variable_context(source, (source,))
add_scope_context(s... | "2" | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_tracer.py | test_assign_function | assert | string_literal | 20 | import ast
from py2many.context import add_variable_context, add_list_calls
from py2many.scope import add_scope_context
from py2many.tracer import is_list, is_recursive, value_expr, value_type
def parse(*args):
source = ast.parse("\n".join(args))
add_variable_context(source, (source,))
add_scope_context(s... | "foo(x)" | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_tracer.py | test_catch_long_expression_chain | assert | string_literal | 19 | import ast
from py2many.context import add_variable_context, add_list_calls
from py2many.scope import add_scope_context
from py2many.tracer import is_list, is_recursive, value_expr, value_type
def parse(*args):
source = ast.parse("\n".join(args))
add_variable_context(source, (source,))
add_scope_context(s... | "3 * 1 - 5 + 2" | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | pyrs/tests/test_tracer.py | test_catch_expression_chain_with_functions | assert | string_literal | 20 | import ast
from py2many.context import add_variable_context, add_list_calls
from py2many.scope import add_scope_context
from py2many.tracer import is_list, is_recursive, value_expr, value_type
def parse(*args):
source = ast.parse("\n".join(args))
add_variable_context(source, (source,))
add_scope_context(s... | "foo(3 * 1) + 2" | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/assert.py | compare_assert | assert | variable | 3 | def compare_assert(a: int, b: int):
assert a == | b | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/asyncio_test.py | async_main | assert | numeric_literal | 8 | import asyncio
async def nested() -> int:
return 42
async def async_main():
assert await nested() == | 42 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/bitops.py | main | assert | collection | 14 | from typing import List
def main():
ands: List[bool] = []
ors: List[bool] = []
xors: List[bool] = []
for a in [False, True]:
for b in [False, True]:
ands.append(a & b)
ors.append(a | b)
xors.append(a ^ b)
assert ands == [False, False, False, True]
as... | [False, True, True, True] | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/bitops.py | main | assert | collection | 15 | from typing import List
def main():
ands: List[bool] = []
ors: List[bool] = []
xors: List[bool] = []
for a in [False, True]:
for b in [False, True]:
ands.append(a & b)
ors.append(a | b)
xors.append(a ^ b)
assert ands == [False, False, False, True]
ass... | [False, True, True, False] | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/bitops.py | main | assert | collection | 13 | from typing import List
def main():
ands: List[bool] = []
ors: List[bool] = []
xors: List[bool] = []
for a in [False, True]:
for b in [False, True]:
ands.append(a & b)
ors.append(a | b)
xors.append(a ^ b)
assert ands == | [False, False, False, True] | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/built_ins.py | default_builtins | assert | numeric_literal | 8 | def default_builtins():
a = str()
b = bool()
c = int()
assert a == ""
assert b == False
assert c == | 0 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/built_ins.py | default_builtins | assert | string_literal | 6 | def default_builtins():
a = str()
b = bool()
c = int()
assert a == | "" | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/built_ins.py | default_builtins | assert | bool_literal | 7 | def default_builtins():
a = str()
b = bool()
c = int()
assert a == ""
assert b == | False | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/complex.py | complex_test | assert | complex_expr | 6 | def complex_test():
c1 = 2 + 3j
c2 = 4 + 5j
c3 = c1 + c2
assert c3 == | 6 + 8j | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/complex.py | complex_test | assert | complex_expr | 8 | def complex_test():
c1 = 2 + 3j
c2 = 4 + 5j
c3 = c1 + c2
assert c3 == 6 + 8j
c4 = c1 + 3
assert c4 == | 5 + 3j | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/complex.py | complex_test | assert | complex_expr | 10 | def complex_test():
c1 = 2 + 3j
c2 = 4 + 5j
c3 = c1 + c2
assert c3 == 6 + 8j
c4 = c1 + 3
assert c4 == 5 + 3j
c5 = c1 + 4j
assert c5 == | 2 + 7j | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/complex.py | complex_test | assert | complex_expr | 12 | def complex_test():
c1 = 2 + 3j
c2 = 4 + 5j
c3 = c1 + c2
assert c3 == 6 + 8j
c4 = c1 + 3
assert c4 == 5 + 3j
c5 = c1 + 4j
assert c5 == 2 + 7j
c6 = c3 - 2.3
assert c6 == | 3.7 + 8j | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/coverage.py | show | assert | numeric_literal | 26 | from typing import List
def inline_pass():
pass
def inline_ellipsis():
...
def indexing():
sum = 0
a: List[int] = []
for i in range(10):
a.append(i)
sum += a[i]
return sum
def infer_bool(code: int):
return code in [1, 2, 4]
def show():
# assign
a1 = 10
# mult... | 15 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/coverage.py | show | assert | numeric_literal | 48 | from typing import List
def inline_pass():
pass
def inline_ellipsis():
...
def indexing():
sum = 0
a: List[int] = []
for i in range(10):
a.append(i)
sum += a[i]
return sum
def infer_bool(code: int):
return code in [1, 2, 4]
def show():
# assign
a1 = 10
# mult... | 10 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/coverage.py | show | assert | numeric_literal | 75 | from typing import List
def inline_pass():
pass
def inline_ellipsis():
...
def indexing():
sum = 0
a: List[int] = []
for i in range(10):
a.append(i)
sum += a[i]
return sum
def infer_bool(code: int):
return code in [1, 2, 4]
def show():
# assign
a1 = 10
# mult... | 11 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/coverage.py | show | assert | variable | 30 | from typing import List
def inline_pass():
pass
def inline_ellipsis():
...
def indexing():
sum = 0
a: List[int] = []
for i in range(10):
a.append(i)
sum += a[i]
return sum
def infer_bool(code: int):
return code in [1, 2, 4]
def show():
# assign
a1 = 10
# mult... | b10 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/exceptions.py | show | assert | func_call | 18 | def show():
try:
raise Exception("foo")
except Exception as e:
print("caught")
finally:
print("Finally")
try:
raise Exception("foo")
except:
print("Got it")
try:
raise Exception("foo")
except Exception as e:
assert "foo" in | str(e) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/infer.py | foo | assert | numeric_literal | 6 | def foo():
a = 10
# infer that b is an int
b = a
assert b == | 10 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/infer_ops.py | show | assert | numeric_literal | 66 | from ctypes import (
c_int8,
c_int16,
c_int32,
c_int64,
c_uint8,
c_uint16,
c_uint32,
c_uint64,
)
def foo():
a = 10
b = 20
_c1 = a + b
_c2 = a - b
_c3 = a * b
_c4 = a / b
_c5 = -a
d = 2.0
_e1 = a + d
_e2 = a - d
_e3 = a * d
_e4 = a / d
... | 12 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/cases/int_enum.py | show | assert | numeric_literal | 16 | from enum import IntEnum, IntFlag, auto
def show():
color_map = {Colors.RED: "red", Colors.GREEN: "green", Colors.BLUE: "blue"}
a = Colors.GREEN
if a == Colors.GREEN:
print("green")
else:
print("Not green")
b = Permissions.R
if b == Permissions.R:
print("R")
else:
... | 0 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/assert.py | compare_assert | assert | variable | 8 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
def compare_assert(a: int, b: int):
assert a == | b | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/asyncio_test.py | async_main | assert | numeric_literal | 12 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
import asyncio
async def nested() -> int:
return 42
async def async_main():
ass... | 42 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/bitops.py | main_func | assert | collection | 18 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
from typing import List
def main_func():
ands: List[bool] = []
ors: List[bool] = ... | [False, True, True, True] | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/bitops.py | main_func | assert | collection | 19 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
from typing import List
def main_func():
ands: List[bool] = []
ors: List[bool] = ... | [False, True, True, False] | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/bitops.py | main_func | assert | collection | 17 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
from typing import List
def main_func():
ands: List[bool] = []
ors: List[bool] = ... | [False, False, False, True] | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/built_ins.py | default_builtins | assert | numeric_literal | 13 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
def default_builtins():
a: str = str()
b: bool = bool()
c: int = int()
as... | 0 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/built_ins.py | default_builtins | assert | string_literal | 11 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
def default_builtins():
a: str = str()
b: bool = bool()
c: int = int()
a... | "" | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/built_ins.py | default_builtins | assert | bool_literal | 12 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
def default_builtins():
a: str = str()
b: bool = bool()
c: int = int()
as... | False | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/complex.py | complex_test | assert | complex_expr | 11 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
def complex_test():
c1: complex = 2 + 3.0j
c2: complex = 4 + 5.0j
c3: complex... | 6 + 8.0j | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/complex.py | complex_test | assert | complex_expr | 13 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
def complex_test():
c1: complex = 2 + 3.0j
c2: complex = 4 + 5.0j
c3: complex... | 5 + 3.0j | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/complex.py | complex_test | assert | complex_expr | 15 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
def complex_test():
c1: complex = 2 + 3.0j
c2: complex = 4 + 5.0j
c3: complex... | 2 + 7.0j | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/complex.py | complex_test | assert | complex_expr | 17 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
def complex_test():
c1: complex = 2 + 3.0j
c2: complex = 4 + 5.0j
c3: complex... | 3.7 + 8.0j | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/coverage.py | show | assert | numeric_literal | 30 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
from typing import List
def inline_pass():
pass
def inline_ellipsis():
...
def ... | 15 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/coverage.py | show | assert | numeric_literal | 45 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
from typing import List
def inline_pass():
pass
def inline_ellipsis():
...
def ... | 10 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/coverage.py | show | assert | numeric_literal | 68 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
from typing import List
def inline_pass():
pass
def inline_ellipsis():
...
def ... | 11 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/coverage.py | show | assert | variable | 34 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
from typing import List
def inline_pass():
pass
def inline_ellipsis():
...
def ... | b10 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/exceptions.py | show | assert | func_call | 21 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
def show():
try:
raise Exception("foo")
except Exception as e:
pr... | str(e) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/infer.py | foo | assert | numeric_literal | 10 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
def foo():
a: int = 10
b: int = a
assert b == | 10 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/infer_ops.py | show | assert | numeric_literal | 70 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
from ctypes import (
c_int8,
c_int16,
c_int32,
c_int64,
c_uint8,
c... | 12 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/expected/int_enum.py | show | assert | numeric_literal | 24 | from typing import Callable, Dict, List, Set, Optional
from ctypes import c_int8 as i8, c_int16 as i16, c_int32 as i32, c_int64 as i64
from ctypes import c_uint8 as u8, c_uint16 as u16, c_uint32 as u32, c_uint64 as u64
import sys
from enum import IntEnum, IntFlag, auto
def show():
color_map: Dict[Colors, str] = {
... | 0 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_cli.py | test_env_cxx_gcc | assert | numeric_literal | 193 | import argparse
import filecmp
import logging
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache
from pathlib import Path
from subprocess import run
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import (
_create_cmd... | 0 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_cli.py | test_directory | assert | collection | 195 | import argparse
import filecmp
import logging
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache
from pathlib import Path
from subprocess import run
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import (
_create_cmd... | [] | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_cli.py | test_generated | self.assertTrue | variable | 286 | import argparse
import filecmp
import logging
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache
from pathlib import Path
from subprocess import run
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import (
_create_cmd... | stdout) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_cli.py | get_python_case_output | assert | variable | 117 | import argparse
import filecmp
import logging
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache
from pathlib import Path
from subprocess import run
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import (
_create_cmd... | exit_code | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_cli.py | test_generated | self.assertTrue | variable | 180 | import argparse
import filecmp
import logging
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache
from pathlib import Path
from subprocess import run
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import (
_create_cmd... | is_script) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_cli.py | test_ext | self.assertEqual | variable | 189 | import argparse
import filecmp
import logging
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache
from pathlib import Path
from subprocess import run
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import (
_create_cmd... | generated) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_cli.py | test_output_path | self.assertEqual | func_call | 140 | import argparse
import filecmp
import logging
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache
from pathlib import Path
from subprocess import run
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import (
_create_cmd... | Path("foo.rs")) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_cli.py | test_generated | assert | complex_expr | 269 | import argparse
import filecmp
import logging
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache
from pathlib import Path
from subprocess import run
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import (
_create_cmd... | proc.returncode | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_cli.py | test_env_clang_format_style | self.assertIn | complex_expr | 154 | import argparse
import filecmp
import logging
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache
from pathlib import Path
from subprocess import run
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import (
_create_cmd... | settings.formatter) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_cli.py | test_output_path | self.assertEqual | func_call | 141 | import argparse
import filecmp
import logging
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache
from pathlib import Path
from subprocess import run
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import (
_create_cmd... | Path("dir") / "foo.rs") | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | test_cpp_recursive | assert | numeric_literal | 72 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | 11 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | test_cpp_recursive | assert | numeric_literal | 77 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | 15 | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | assert_reformat_fails | assert_* | variable | 29 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | failures) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | assert_counts | assert | variable | 53 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | failure_count | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | assert_no_failures | assert | variable | 33 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | expected_success | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | assert_counts | assert | variable | 52 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | format_error_count | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | assert_only_init_successful | assert | collection | 26 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | {dunder_init_dot_py} | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | test_rust_recursive | assert_* | func_call | 74 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | *_process_dir( settings, PY2MANY_MODULE, OUT_DIR, False, _suppress_exceptions=False )) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | test_nim_recursive | assert_* | func_call | 74 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | *_process_dir( settings, PY2MANY_MODULE, OUT_DIR, False, _suppress_exceptions=False, )) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | test_rust_recursive | assert_* | func_call | 65 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | *_process_dir( settings, transpiler_module, OUT_DIR, False, _suppress_exceptions=False )) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | test_nim_recursive | assert_* | func_call | 65 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | *_process_dir( settings, transpiler_module, OUT_DIR, False, _suppress_exceptions=False, )) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | test_go_recursive | assert_* | func_call | 77 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | *_process_dir( settings, PY2MANY_MODULE, OUT_DIR, False, _suppress_exceptions=suppress_exceptions, )) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_transpile_self.py | test_kotlin_recursive | assert_* | func_call | 70 | import os
import unittest
from distutils import spawn
from pathlib import Path
from shutil import rmtree
from unittest.mock import Mock
from py2many.cli import _get_all_settings, _process_dir
from py2many.exceptions import (
AstNotImplementedError,
AstTypeNotSupported,
AstUnrecognisedBinOp,
)
SHOW_ERRORS... | *_process_dir( settings, transpiler_module, OUT_DIR, False, _suppress_exceptions=suppress_exceptions, )) | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_unsupported.py | test_comment_unimplemented_body | assert | variable | 251 | import ast
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache, partial
from subprocess import run
from textwrap import dedent
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import _get_all_settings, _relative_to_cwd, _t... | result | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
py2many/py2many | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | train | train | tests/test_unsupported.py | test_error_cases | assert | variable | 244 | import ast
import os.path
import unittest
import sys
from distutils import spawn
from functools import lru_cache, partial
from subprocess import run
from textwrap import dedent
from unittest.mock import Mock
from unittest_expander import foreach, expand
from py2many.cli import _get_all_settings, _relative_to_cwd, _t... | expected_error | 94c5f0e66aa1b9e489abf59e1f60a29721eae1cf | 251 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_credentials.py | test_get_credentials | assert | bool_literal | 15 | import logging
import pytest
from jenkinsapi_tests.test_utils.random_strings import random_string
from jenkinsapi.credentials import Credentials
from jenkinsapi.credentials import UsernamePasswordCredential
from jenkinsapi.credentials import SecretTextCredential
from jenkinsapi.credential import SSHKeyCredential
from j... | True | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_credentials.py | test_create_user_pass_credential | assert | none_literal | 28 | import logging
import pytest
from jenkinsapi_tests.test_utils.random_strings import random_string
from jenkinsapi.credentials import Credentials
from jenkinsapi.credentials import UsernamePasswordCredential
from jenkinsapi.credentials import SecretTextCredential
from jenkinsapi.credential import SSHKeyCredential
from j... | None | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_credentials.py | test_create_user_pass_credential | assert | variable | 24 | import logging
import pytest
from jenkinsapi_tests.test_utils.random_strings import random_string
from jenkinsapi.credentials import Credentials
from jenkinsapi.credentials import UsernamePasswordCredential
from jenkinsapi.credentials import SecretTextCredential
from jenkinsapi.credential import SSHKeyCredential
from j... | creds | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_credentials.py | test_delete_inexistant_credential | pytest.raises | variable | 14 | import logging
import pytest
from jenkinsapi_tests.test_utils.random_strings import random_string
from jenkinsapi.credentials import Credentials
from jenkinsapi.credentials import UsernamePasswordCredential
from jenkinsapi.credentials import SecretTextCredential
from jenkinsapi.credential import SSHKeyCredential
from j... | KeyError) | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_credentials.py | test_create_user_pass_credential | assert | variable | 29 | import logging
import pytest
from jenkinsapi_tests.test_utils.random_strings import random_string
from jenkinsapi.credentials import Credentials
from jenkinsapi.credentials import UsernamePasswordCredential
from jenkinsapi.credentials import SecretTextCredential
from jenkinsapi.credential import SSHKeyCredential
from j... | cred_descr | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_credentials.py | test_update_user_pass_credential | assert | string_literal | 31 | import logging
import pytest
from jenkinsapi_tests.test_utils.random_strings import random_string
from jenkinsapi.credentials import Credentials
from jenkinsapi.credentials import UsernamePasswordCredential
from jenkinsapi.credentials import SecretTextCredential
from jenkinsapi.credential import SSHKeyCredential
from j... | 'password2' | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_credentials.py | test_update_user_pass_credential | assert | string_literal | 30 | import logging
import pytest
from jenkinsapi_tests.test_utils.random_strings import random_string
from jenkinsapi.credentials import Credentials
from jenkinsapi.credentials import UsernamePasswordCredential
from jenkinsapi.credentials import SecretTextCredential
from jenkinsapi.credential import SSHKeyCredential
from j... | 'anotheruser' | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_crumbs_requester.py | test_invoke_job_with_file | assert | bool_literal | 121 | import time
import json
import logging
import pytest
from six import StringIO
from six.moves.urllib.parse import urljoin
from jenkinsapi.jenkins import Jenkins
from jenkinsapi.utils.crumb_requester import CrumbRequester
from jenkinsapi_tests.test_utils.random_strings import random_string
from jenkinsapi_tests.systests... | True | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_crumbs_requester.py | test_invoke_job_with_file | assert | variable | 123 | import time
import json
import logging
import pytest
from six import StringIO
from six.moves.urllib.parse import urljoin
from jenkinsapi.jenkins import Jenkins
from jenkinsapi.utils.crumb_requester import CrumbRequester
from jenkinsapi_tests.test_utils.random_strings import random_string
from jenkinsapi_tests.systests... | file_data | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_downstream_upstream.py | test_stream_relationship | assert | collection | 110 | import time
import logging
import pytest
from jenkinsapi.custom_exceptions import NoBuildData
log = logging.getLogger(__name__)
JOB_CONFIGS = {
'A': """<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm cl... | [jenkins['B']] | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_downstream_upstream.py | test_stream_relationship | assert | collection | 111 | import time
import logging
import pytest
from jenkinsapi.custom_exceptions import NoBuildData
log = logging.getLogger(__name__)
JOB_CONFIGS = {
'A': """<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm cl... | [jenkins['A']] | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
pycontribs/jenkinsapi | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | train | train | jenkinsapi_tests/systests/test_downstream_upstream.py | test_stream_relationship | assert | collection | 114 | import time
import logging
import pytest
from jenkinsapi.custom_exceptions import NoBuildData
log = logging.getLogger(__name__)
JOB_CONFIGS = {
'A': """<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm cl... | [jenkins['C']] | 233397ee186b1923638fb52858ac48ea96d24421 | 173 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.