add_import_name
Add a name to an existing named import statement. Use when the module is already imported and you need to import an additional symbol.
Instructions
Add a name to an existing named-import statement. Idempotent: skips if the name is already present.
Python (.py):
from <module> import a, bJS/TS:
import { a, b } from "<module>"
Use this when: The module is already imported via a named-import form and
you want to add another name to that existing statement.
Don't use this when: The import statement doesn't exist yet -> use
add_import. You want a default or namespace import (import Foo from ...
or import * as ns from ...) -> use add_import with the full line.
Example (Python): module="typing" name="Optional" Example (TS): module="./utils" name="baz"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| module | Yes | ||
| name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |