Skip to content

[Docs] Add docstrings to CodemodCommand import helper methods#1437

Merged
frvnkliu merged 1 commit intoInstagram:mainfrom
frvnkliu:main
Jan 12, 2026
Merged

[Docs] Add docstrings to CodemodCommand import helper methods#1437
frvnkliu merged 1 commit intoInstagram:mainfrom
frvnkliu:main

Conversation

@frvnkliu
Copy link
Member

@frvnkliu frvnkliu commented Jan 9, 2026

This PR

Follow up to: #1432

  • Add comprehensive docstrings to the remove_unused_import, remove_unused_import_by_node, and add_needed_import helper methods on CodemodCommand
  • Document the relationship between these convenience wrappers and their underlying AddImportsVisitor/RemoveImportsVisitor static methods
  • Include usage examples showing common patterns for adding and removing imports

Test plan

Standard Tests: uv run poe format && uv run poe typecheck && uv run poe lint && uv run poe test

  • Documentation builds successfully: uv run poe docs
  • Verified docstrings render correctly in generated Sphinx documentation
image

Add comprehensive docstrings to the remove_unused_import,
remove_unused_import_by_node, and add_needed_import helper methods
on CodemodCommand class. These docstrings include descriptions,
usage examples, and important notes about proper usage.
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 9, 2026
@frvnkliu frvnkliu merged commit d77fc49 into Instagram:main Jan 12, 2026
42 checks passed
jorenham pushed a commit to jorenham/LibCST that referenced this pull request Feb 3, 2026
Add comprehensive docstrings to the remove_unused_import,
remove_unused_import_by_node, and add_needed_import helper methods
on CodemodCommand class. These docstrings include descriptions,
usage examples, and important notes about proper usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant