MCPcopy
hub / github.com/marimo-team/marimo / toCode

Method toCode

frontend/src/utils/python-poet/poet.ts:168–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

166 }
167
168 toCode(): string {
169 if (this.multiLine) {
170 if (this.args.length === 0) {
171 return `${this.name}()`;
172 }
173 if (this.args.length === 1) {
174 return `${this.name}(${this.args[0].toCode()})`;
175 }
176 return `${this.name}(${indentList(this.args)})`;
177 }
178 return `${this.name}(${this.args.map(asString).join(", ")})`;
179 }
180
181 addArg(...args: PythonCode[]): FunctionCall {
182 return new FunctionCall(this.name, [...this.args, ...args], this.multiLine);

Callers 1

chainMethod · 0.95

Calls 4

indentListFunction · 0.85
toCodeMethod · 0.65
joinMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected