SYMBOL INDEX (213 symbols across 49 files) FILE: py_backwards/compiler.py function _transform (line 16) | def _transform(path: str, code: str, target: CompilationTarget) -> Tuple... function _compile_file (line 55) | def _compile_file(paths: InputOutput, target: CompilationTarget) -> List... function compile_files (line 81) | def compile_files(input_: str, output: str, target: CompilationTarget, FILE: py_backwards/conf.py class Settings (line 4) | class Settings: method __init__ (line 5) | def __init__(self) -> None: function init_settings (line 12) | def init_settings(args: Namespace) -> None: FILE: py_backwards/exceptions.py class CompilationError (line 7) | class CompilationError(Exception): method __init__ (line 10) | def __init__(self, filename: str, code: str, class TransformationError (line 18) | class TransformationError(Exception): method __init__ (line 21) | def __init__(self, filename: str, class InvalidInputOutput (line 31) | class InvalidInputOutput(Exception): class InputDoesntExists (line 35) | class InputDoesntExists(Exception): class NodeNotFound (line 39) | class NodeNotFound(Exception): FILE: py_backwards/files.py function get_input_output_paths (line 12) | def get_input_output_paths(input_: str, output: str, FILE: py_backwards/main.py function main (line 12) | def main() -> int: FILE: py_backwards/messages.py function _format_line (line 8) | def _format_line(line: str, n: int, padding: int) -> str: function _get_lines_with_highlighted_error (line 16) | def _get_lines_with_highlighted_error(e: CompilationError) -> Iterable[s... function syntax_error (line 48) | def syntax_error(e: CompilationError) -> str: function transformation_error (line 60) | def transformation_error(e: TransformationError) -> str: function input_doesnt_exists (line 71) | def input_doesnt_exists(input_: str) -> str: function invalid_output (line 76) | def invalid_output(input_: str, output: str) -> str: function permission_error (line 82) | def permission_error(output: str) -> str: function compilation_result (line 87) | def compilation_result(result: CompilationResult) -> str: function warn (line 109) | def warn(message: str) -> str: function debug (line 117) | def debug(message: str) -> str: FILE: py_backwards/transformers/base.py class BaseTransformer (line 8) | class BaseTransformer(metaclass=ABCMeta): method transform (line 13) | def transform(cls, tree: ast.AST) -> TransformationResult: class BaseNodeTransformer (line 17) | class BaseNodeTransformer(BaseTransformer, ast.NodeTransformer): method __init__ (line 20) | def __init__(self, tree: ast.AST) -> None: method transform (line 26) | def transform(cls, tree: ast.AST) -> TransformationResult: function import_rewrite (line 33) | def import_rewrite(previous, current): class BaseImportRewrite (line 40) | class BaseImportRewrite(BaseNodeTransformer): method _get_matched_rewrite (line 44) | def _get_matched_rewrite(self, name: Optional[str]) -> Optional[Tuple[... method _replace_import (line 55) | def _replace_import(self, node: ast.Import, from_: str, to: str) -> as... method visit_Import (line 69) | def visit_Import(self, node: ast.Import) -> Union[ast.Import, ast.Try]: method _replace_import_from_module (line 76) | def _replace_import_from_module(self, node: ast.ImportFrom, from_: str... method _get_names_to_replace (line 88) | def _get_names_to_replace(self, node: ast.ImportFrom) -> Iterable[Tupl... method _get_replaced_import_from_part (line 97) | def _get_replaced_import_from_part(self, node: ast.ImportFrom, alias: ... method _replace_import_from_names (line 113) | def _replace_import_from_names(self, node: ast.ImportFrom, method visit_ImportFrom (line 128) | def visit_ImportFrom(self, node: ast.ImportFrom) -> Union[ast.ImportFr... FILE: py_backwards/transformers/class_without_bases.py class ClassWithoutBasesTransformer (line 5) | class ClassWithoutBasesTransformer(BaseNodeTransformer): method visit_ClassDef (line 15) | def visit_ClassDef(self, node: ast.ClassDef) -> ast.ClassDef: FILE: py_backwards/transformers/dict_unpacking.py function merge_dicts (line 9) | def merge_dicts(): class DictUnpackingTransformer (line 21) | class DictUnpackingTransformer(BaseNodeTransformer): method _split_by_None (line 33) | def _split_by_None(self, pairs: Iterable[Pair]) -> Splitted: method _prepare_splitted (line 46) | def _prepare_splitted(self, splitted: Splitted) \ method _merge_dicts (line 59) | def _merge_dicts(self, xs: Iterable[Union[ast.Call, ast.Dict]]) \ method visit_Module (line 67) | def visit_Module(self, node: ast.Module) -> ast.Module: method visit_Dict (line 71) | def visit_Dict(self, node: ast.Dict) -> Union[ast.Dict, ast.Call]: FILE: py_backwards/transformers/formatted_values.py class FormattedValuesTransformer (line 6) | class FormattedValuesTransformer(BaseNodeTransformer): method visit_FormattedValue (line 15) | def visit_FormattedValue(self, node: ast.FormattedValue) -> ast.Call: method visit_JoinedStr (line 29) | def visit_JoinedStr(self, node: ast.JoinedStr) -> ast.Call: FILE: py_backwards/transformers/functions_annotations.py class FunctionsAnnotationsTransformer (line 5) | class FunctionsAnnotationsTransformer(BaseNodeTransformer): method visit_arg (line 16) | def visit_arg(self, node: ast.arg) -> ast.arg: method visit_FunctionDef (line 21) | def visit_FunctionDef(self, node: ast.FunctionDef): FILE: py_backwards/transformers/import_dbm.py function import_rewrite (line 8) | def import_rewrite(previous, current): class ImportDbmTransformer (line 15) | class ImportDbmTransformer(BaseImportRewrite): method visit_Import (line 28) | def visit_Import(self, node: ast.Import) -> Union[ast.Import, ast.Try]: method visit_ImportFrom (line 34) | def visit_ImportFrom(self, node: ast.ImportFrom) -> Union[ast.ImportFr... FILE: py_backwards/transformers/import_pathlib.py class ImportPathlibTransformer (line 4) | class ImportPathlibTransformer(BaseImportRewrite): FILE: py_backwards/transformers/metaclass.py function six_import (line 8) | def six_import(): function class_bases (line 13) | def class_bases(metaclass, bases): class MetaclassTransformer (line 17) | class MetaclassTransformer(BaseNodeTransformer): method visit_Module (line 28) | def visit_Module(self, node: ast.Module) -> ast.Module: method visit_ClassDef (line 32) | def visit_ClassDef(self, node: ast.ClassDef) -> ast.ClassDef: FILE: py_backwards/transformers/python2_future.py function imports (line 7) | def imports(future): class Python2FutureTransformer (line 14) | class Python2FutureTransformer(BaseNodeTransformer): method visit_Module (line 24) | def visit_Module(self, node: ast.Module) -> ast.Module: FILE: py_backwards/transformers/return_from_generator.py function return_from_generator (line 8) | def return_from_generator(return_value): class ReturnFromGeneratorTransformer (line 15) | class ReturnFromGeneratorTransformer(BaseNodeTransformer): method _find_generator_returns (line 29) | def _find_generator_returns(self, node: ast.FunctionDef) \ method _replace_return (line 56) | def _replace_return(self, parent: Any, return_: ast.Return) -> None: method visit_FunctionDef (line 64) | def visit_FunctionDef(self, node: ast.FunctionDef) -> ast.FunctionDef: FILE: py_backwards/transformers/six_moves.py class MovedAttribute (line 7) | class MovedAttribute: method __init__ (line 8) | def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): class MovedModule (line 21) | class MovedModule: method __init__ (line 22) | def __init__(self, name, old, new=None): function _get_rewrites (line 199) | def _get_rewrites(): class SixMovesTransformer (line 209) | class SixMovesTransformer(BaseImportRewrite): FILE: py_backwards/transformers/starred_unpacking.py class StarredUnpackingTransformer (line 9) | class StarredUnpackingTransformer(BaseNodeTransformer): method _has_starred (line 20) | def _has_starred(self, xs: List[ast.expr]) -> bool: method _split_by_starred (line 27) | def _split_by_starred(self, xs: Iterable[ast.expr]) -> List[Splitted]: method _prepare_lists (line 39) | def _prepare_lists(self, xs: List[Splitted]) -> Iterable[ListEntry]: method _merge_lists (line 50) | def _merge_lists(self, xs: List[ListEntry]) -> Union[ast.BinOp, ListEn... method _to_sum_of_lists (line 60) | def _to_sum_of_lists(self, xs: List[ast.expr]) -> Union[ast.BinOp, Lis... method visit_List (line 66) | def visit_List(self, node: ast.List) -> ast.List: method visit_Call (line 74) | def visit_Call(self, node: ast.Call) -> ast.Call: FILE: py_backwards/transformers/string_types.py class StringTypesTransformer (line 7) | class StringTypesTransformer(BaseTransformer): method transform (line 14) | def transform(cls, tree: ast.AST) -> TransformationResult: FILE: py_backwards/transformers/super_without_arguments.py class SuperWithoutArgumentsTransformer (line 8) | class SuperWithoutArgumentsTransformer(BaseNodeTransformer): method _replace_super_args (line 18) | def _replace_super_args(self, node: ast.Call) -> None: method visit_Call (line 33) | def visit_Call(self, node: ast.Call) -> ast.Call: FILE: py_backwards/transformers/variables_annotations.py class VariablesAnnotationsTransformer (line 9) | class VariablesAnnotationsTransformer(BaseTransformer): method transform (line 20) | def transform(cls, tree: ast.AST) -> TransformationResult: FILE: py_backwards/transformers/yield_from.py function result_assignment (line 13) | def result_assignment(exc, target): function yield_from (line 19) | def yield_from(generator, exc, assignment): class YieldFromTransformer (line 30) | class YieldFromTransformer(BaseNodeTransformer): method _get_yield_from_index (line 34) | def _get_yield_from_index(self, node: ast.AST, method _emulate_yield_from (line 43) | def _emulate_yield_from(self, target: Optional[ast.AST], method _handle_assignments (line 55) | def _handle_assignments(self, node: Node) -> Node: method _handle_expressions (line 67) | def _handle_expressions(self, node: Node) -> Node: method visit (line 78) | def visit(self, node: ast.AST) -> ast.AST: FILE: py_backwards/utils/helpers.py function eager (line 12) | def eager(fn: Callable[..., Iterable[T]]) -> Callable[..., List[T]]: class VariablesGenerator (line 20) | class VariablesGenerator: method generate (line 24) | def generate(cls, variable: str) -> str: function get_source (line 32) | def get_source(fn: Callable[..., Any]) -> str: function warn (line 39) | def warn(message: str) -> None: function debug (line 43) | def debug(get_message: Callable[[], str]) -> None: FILE: py_backwards/utils/snippet.py function find_variables (line 10) | def find_variables(tree: ast.AST) -> Iterable[str]: class VariablesReplacer (line 22) | class VariablesReplacer(ast.NodeTransformer): method __init__ (line 25) | def __init__(self, variables: Dict[str, Variable]) -> None: method _replace_field_or_node (line 28) | def _replace_field_or_node(self, node: T, field: str, all_types=False)... method visit_Name (line 38) | def visit_Name(self, node: ast.Name) -> ast.Name: method visit_FunctionDef (line 42) | def visit_FunctionDef(self, node: ast.FunctionDef) -> ast.FunctionDef: method visit_Attribute (line 46) | def visit_Attribute(self, node: ast.Attribute) -> ast.Attribute: method visit_keyword (line 50) | def visit_keyword(self, node: ast.keyword) -> ast.keyword: method visit_ClassDef (line 54) | def visit_ClassDef(self, node: ast.ClassDef) -> ast.ClassDef: method visit_arg (line 58) | def visit_arg(self, node: ast.arg) -> ast.arg: method _replace_module (line 62) | def _replace_module(self, module: str) -> str: method visit_ImportFrom (line 72) | def visit_ImportFrom(self, node: ast.ImportFrom) -> ast.ImportFrom: method visit_alias (line 76) | def visit_alias(self, node: ast.alias) -> ast.alias: method visit_ExceptHandler (line 81) | def visit_ExceptHandler(self, node: ast.ExceptHandler) -> ast.ExceptHa... method replace (line 86) | def replace(cls, tree: T, variables: Dict[str, Variable]) -> T: function extend_tree (line 93) | def extend_tree(tree: ast.AST, variables: Dict[str, Variable]) -> None: class snippet (line 104) | class snippet: method __init__ (line 107) | def __init__(self, fn: Callable[..., None]) -> None: method _get_variables (line 110) | def _get_variables(self, tree: ast.AST, method get_body (line 124) | def get_body(self, **snippet_kwargs: Variable) -> List[ast.AST]: function let (line 134) | def let(var: Any) -> None: function extend (line 148) | def extend(var: Any) -> None: FILE: py_backwards/utils/tree.py function _build_parents (line 10) | def _build_parents(tree: ast.AST) -> None: function get_parent (line 16) | def get_parent(tree: ast.AST, node: ast.AST, rebuild: bool = False) -> a... function get_node_position (line 27) | def get_node_position(tree: ast.AST, node: ast.AST) -> NodePosition: function find (line 46) | def find(tree: ast.AST, type_: Type[T]) -> Iterable[T]: function insert_at (line 53) | def insert_at(index: int, parent: ast.AST, function replace_at (line 64) | def replace_at(index: int, parent: ast.AST, function get_closest_parent_of (line 72) | def get_closest_parent_of(tree: ast.AST, node: ast.AST, FILE: tests/conftest.py function reset_variables_generator (line 7) | def reset_variables_generator(): function as_str (line 12) | def as_str(): function as_ast (line 20) | def as_ast(): function pytest_addoption (line 27) | def pytest_addoption(parser): function functional (line 35) | def functional(request): FILE: tests/functional/input.py function test_variables (line 6) | def test_variables(): function test_strings (line 19) | def test_strings(): function test_lists (line 33) | def test_lists(): function test_dicts (line 47) | def test_dicts(): function test_functions (line 67) | def test_functions(): function test_cycles (line 94) | def test_cycles(): function test_class (line 118) | def test_class(): function test_generators (line 153) | def test_generators(): function test_for_comprehension (line 177) | def test_for_comprehension(): function test_exceptions (line 189) | def test_exceptions(): function test_context_manager (line 207) | def test_context_manager(): function test_imports (line 229) | def test_imports(): FILE: tests/functional/test_compiled_code.py function test_compiled_code (line 28) | def test_compiled_code(spawnu, TIMEOUT, version, target): FILE: tests/test_compiler.py class TestCompileFiles (line 11) | class TestCompileFiles(object): method input_output (line 13) | def input_output(self, mocker): method test_syntax_error (line 19) | def test_syntax_error(self, input_output): method test_compile (line 25) | def test_compile(self, input_output): FILE: tests/test_files.py class TestGetInputPath (line 12) | class TestGetInputPath(object): method exists (line 14) | def exists(self, mocker): method test_dir_to_file (line 19) | def test_dir_to_file(self): method test_non_exists_input (line 23) | def test_non_exists_input(self, exists): method test_file_to_dir (line 28) | def test_file_to_dir(self): method test_file_to_file (line 32) | def test_file_to_file(self): method test_dir_to_dir (line 36) | def test_dir_to_dir(self, mocker): method test_file_to_dir_with_root (line 43) | def test_file_to_dir_with_root(self): method test_dir_to_dir_with_root (line 50) | def test_dir_to_dir_with_root(self, mocker): FILE: tests/transformers/conftest.py function transform (line 8) | def transform(): function run_transformed (line 25) | def run_transformed(transform): function ast (line 45) | def ast(): FILE: tests/transformers/test_class_without_bases.py function test_transform (line 20) | def test_transform(transform, ast, before, after): FILE: tests/transformers/test_dict_unpacking.py function test_transform (line 20) | def test_transform(transform, ast, before, after): function test_run (line 30) | def test_run(run_transformed, code, result): FILE: tests/transformers/test_formatted_values.py function test_transform (line 10) | def test_transform(transform, ast, before, after): function test_run (line 20) | def test_run(run_transformed, code, result): FILE: tests/transformers/test_functions_annotations.py function test_transform (line 10) | def test_transform(transform, ast, before, after): function test_run (line 18) | def test_run(run_transformed, code, result): FILE: tests/transformers/test_import_dbm.py function test_transform (line 27) | def test_transform(transform, ast, before, after): FILE: tests/transformers/test_import_pathlib.py function test_transform (line 27) | def test_transform(transform, ast, before, after): FILE: tests/transformers/test_metaclass.py function test_transform (line 26) | def test_transform(transform, ast, before, after): FILE: tests/transformers/test_python2_future.py function test_transform (line 20) | def test_transform(transform, ast, before, after): FILE: tests/transformers/test_return_from_generator.py function test_transform (line 30) | def test_transform(transform, ast, before, after): function test_run (line 72) | def test_run(run_transformed, code, result): FILE: tests/transformers/test_six_moves.py function test_transform (line 35) | def test_transform(transform, ast, before, after): FILE: tests/transformers/test_starred_unpacking.py function test_transform (line 19) | def test_transform(transform, ast, before, after): function test_run (line 37) | def test_run(run_transformed, code, result): FILE: tests/transformers/test_string_types.py function test_transform (line 9) | def test_transform(transform, ast, before, after): FILE: tests/transformers/test_super_without_arguments.py function test_transform (line 30) | def test_transform(transform, ast, before, after): function test_run (line 60) | def test_run(run_transformed, code, result): FILE: tests/transformers/test_variables_annotations.py function test_transform (line 8) | def test_transform(transform, ast, before, after): function test_run (line 16) | def test_run(run_transformed, code, result): FILE: tests/transformers/test_yield_from.py function test_transform (line 33) | def test_transform(transform, ast, before, after): function test_run (line 57) | def test_run(run_transformed, code, result): FILE: tests/utils/test_helpers.py function test_eager (line 4) | def test_eager(): function test_variables_generator (line 14) | def test_variables_generator(): function test_get_source (line 19) | def test_get_source(): FILE: tests/utils/test_snippet.py function test_variables_finder (line 7) | def test_variables_finder(): function test_variables_replacer (line 16) | def test_variables_replacer(): function to_extend (line 51) | def to_extend(): function test_extend_tree (line 55) | def test_extend_tree(): function my_snippet (line 70) | def my_snippet(class_name, x_value): function _get_code (line 109) | def _get_code(): function test_snippet_code (line 116) | def test_snippet_code(): function test_snippet_run (line 121) | def test_snippet_run(): FILE: tests/utils/test_tree.py function test_get_parent (line 8) | def test_get_parent(as_ast): class TestGetNodePosition (line 17) | class TestGetNodePosition: method test_from_body (line 18) | def test_from_body(self, as_ast): method test_from_orelse (line 30) | def test_from_orelse(self, as_ast): function test_find (line 45) | def test_find(as_ast): function to_insert (line 56) | def to_insert(): function test_insert_at (line 60) | def test_insert_at(as_ast, as_str): function test_replace_at (line 75) | def test_replace_at(as_ast, as_str):