aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/infini/output.py
blob: ddb7f0a5e0a8c18f067b7c84e123f8377fffee05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from infini.typing import Literal


class Output:
    type: Literal["null", "text", "workflow"]
    name: str
    status: int
    block: bool

    @classmethod
    def empty(cls) -> "Output":
        output = cls()
        output.type = "null"
        output.status = 0
        output.block = True
        return output

    def is_empty(self) -> bool:
        return self.type == "null"