replace_function_body
Replace a function's implementation while preserving its signature and decorators to maintain interface stability during code updates.
Instructions
Replace only the body of a function, preserving its signature and decorators.
Use this when: You're changing the implementation while keeping the interface stable.
Don't use this when: You're also changing parameters or return type -> use
replace_signature or replace_function.
Example: target="LRUCache.get" content=' if key in self.items:\n return self.items[key]\n return None'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| target | Yes | ||
| content | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |