| 19 | |
| 20 | |
| 21 | class ScriptKey: |
| 22 | def __init__(self, id=None): |
| 23 | self._id = id or uuid.uuid4() |
| 24 | |
| 25 | @property |
| 26 | def id(self): |
| 27 | return self._id |
| 28 | |
| 29 | def __eq__(self, other: object) -> bool: |
| 30 | if isinstance(other, ScriptKey): |
| 31 | return self._id == other._id |
| 32 | return self._id == other |
| 33 | |
| 34 | def __hash__(self) -> int: |
| 35 | return hash(self._id) |
| 36 | |
| 37 | def __repr__(self) -> str: |
| 38 | return f"ScriptKey(id={self.id})" |
no outgoing calls