(
name: string,
args: PythonCode[] | Record<string, PythonCode>,
)
| 183 | } |
| 184 | |
| 185 | chain( |
| 186 | name: string, |
| 187 | args: PythonCode[] | Record<string, PythonCode>, |
| 188 | ): FunctionCall { |
| 189 | args = objectToArgs(args); |
| 190 | |
| 191 | // If the function call is multi-line, we need to add a newline to the name |
| 192 | const fullName = this.multiLine |
| 193 | ? `${this.toCode()}\n.${name}` |
| 194 | : `${this.toCode()}.${name}`; |
| 195 | |
| 196 | return new FunctionCall(fullName, args, this.multiLine); |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | function objectToArgs( |
no test coverage detected