remove_import
Remove an unused import line from a source file by matching its exact text with surrounding whitespace stripped, preserving the rest of the file.
Instructions
Remove an import line, matched by its text with surrounding whitespace stripped.
Use this when: removing an unused import. Don't use this when: removing one name from a multi-name import (remove_import_name).
Example: import_text="import os"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the source or config file. | |
| import_text | Yes | Exact import line to remove (e.g. 'import os'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |