(self, s: str)
| 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: |
| 2478 | try: |
| 2479 | v = trait_type.from_string(s) |
| 2480 | return trait_type.validate(None, v) |
| 2481 | except (TraitError, ValueError): |
| 2482 | continue |
| 2483 | return super().from_string(s) |
| 2484 | |
| 2485 | |
| 2486 | # ----------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected