LibCST/libcst/codemod/tests
Frank Liu b75343e74e
Create CodemodCommand Remove/Add Import helper functions (#1432)
* Create helper functions to abstract away usage of RemoveImportsVisitor's remove unused import functions in CodemodCommand

* Create helper functions to abstract away usage of AddImportsVisitor's add needed import functions in CodemodCommand

* Add tests for CodemodCommand helper functions

Add comprehensive tests for the new helper methods:
- remove_unused_import
- remove_unused_import_by_node
- add_needed_import

Tests cover simple cases, from imports, aliased imports,
relative imports, and combined add/remove operations.
2025-12-17 09:28:24 -08:00
..
__init__.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00
codemod_formatter_error_input.py.txt Fix license headers (#560) 2021-12-28 11:55:18 +00:00
test_codemod.py Bump black from 22.12.0 to 23.1.0 (#860) 2023-03-15 11:53:50 +00:00
test_codemod_cli.py remove entry points to pure parser (#1375) 2025-07-30 16:27:20 +00:00
test_command_helpers.py Create CodemodCommand Remove/Add Import helper functions (#1432) 2025-12-17 09:28:24 -08:00
test_metadata.py Bump black from 22.12.0 to 23.1.0 (#860) 2023-03-15 11:53:50 +00:00
test_runner.py Fix license headers (#560) 2021-12-28 11:55:18 +00:00