(self, other: t.Any)
| 2468 | self.error(obj, value) |
| 2469 | |
| 2470 | def __or__(self, other: t.Any) -> Union: |
| 2471 | if isinstance(other, Union): |
| 2472 | return Union(self.trait_types + other.trait_types) |
| 2473 | else: |
| 2474 | return Union([*self.trait_types, other]) |
| 2475 | |
| 2476 | def from_string(self, s: str) -> t.Any: |
| 2477 | for trait_type in self.trait_types: |