| 4 | |
| 5 | |
| 6 | class Note(SQLObject, DBMLObject): |
| 7 | dont_compare_fields = ('parent',) |
| 8 | |
| 9 | def __init__(self, text: Any) -> None: |
| 10 | self.text: str |
| 11 | self.text = str(text) if text is not None else '' |
| 12 | self.parent: Any = None |
| 13 | |
| 14 | def __str__(self): |
| 15 | '''Note text''' |
| 16 | return self.text |
| 17 | |
| 18 | def __bool__(self): |
| 19 | return bool(self.text) |
| 20 | |
| 21 | def __repr__(self): |
| 22 | '''Note('Note text')''' |
| 23 | return f'Note({repr(self.text)})' |
no outgoing calls