module_to_package
Converts a Python module file into a package by creating a directory for it and moving the module to init.py, rewriting relative imports as absolute. Preview changes with dry-run; set apply=true to execute.
Instructions
Convert a Python module file into a package: creates a directory of the module's name and moves the module to its init.py, rewriting relative imports to absolute. Pass the module's file path alone; no Position needed. Defaults to a Dry Run preview (created and moved entries appear in the Blast Radius); set apply=true to write. Use your LSP for navigation and reading; this tool only restructures.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| root | No | ||
| apply | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||