MCPcopy Create free account
hub / github.com/ipython/traitlets / __or__

Method __or__

traitlets/traitlets.py:2470–2474  ·  view source on GitHub ↗
(self, other: t.Any)

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls 1

UnionClass · 0.85

Tested by

no test coverage detected