remove_import
Remove unused import statements from source files by matching exact import text. Use this tool to clean up code by eliminating unnecessary imports from your project files.
Instructions
Remove a matching import statement from a source file. Matching is by stripped text equality -- pass the exact import line you want to remove.
Use this when: You want to remove an unused import.
Don't use this when: You want to remove one name from a multi-name import -> use
remove_import_name.
Example: import_text="import os"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| import_text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |