Skip to main content

refactor

Method
This is a method of the CodeAgent class in the code_agent module.
Refactor code to improve quality.

Signature

def refactor(code: str, instructions: str, language: str) -> str

Parameters

code
str
required
Code to refactor
instructions
str
default:"''"
Specific refactoring instructions
language
str
default:"'python'"
Programming language **kwargs: Additional arguments

Returns

Returns
str
Refactored code as string