| 324 | |
| 325 | |
| 326 | class BlockFunction: |
| 327 | def __init__( |
| 328 | self, |
| 329 | fn: Optional[Callable], |
| 330 | inputs: List[Component], |
| 331 | outputs: List[Component], |
| 332 | preprocess: bool, |
| 333 | postprocess: bool, |
| 334 | inputs_as_dict: bool, |
| 335 | ): |
| 336 | self.fn = fn |
| 337 | self.inputs = inputs |
| 338 | self.outputs = outputs |
| 339 | self.preprocess = preprocess |
| 340 | self.postprocess = postprocess |
| 341 | self.total_runtime = 0 |
| 342 | self.total_runs = 0 |
| 343 | self.inputs_as_dict = inputs_as_dict |
| 344 | |
| 345 | def __str__(self): |
| 346 | return str( |
| 347 | { |
| 348 | "fn": getattr(self.fn, "__name__", "fn") |
| 349 | if self.fn is not None |
| 350 | else None, |
| 351 | "preprocess": self.preprocess, |
| 352 | "postprocess": self.postprocess, |
| 353 | } |
| 354 | ) |
| 355 | |
| 356 | def __repr__(self): |
| 357 | return str(self) |
| 358 | |
| 359 | |
| 360 | class class_or_instancemethod(classmethod): |
no outgoing calls
no test coverage detected