Returns whether the given value is an instance or subclass of TraitType.
(t: t.Any)
| 193 | |
| 194 | |
| 195 | def is_trait(t: t.Any) -> bool: |
| 196 | """Returns whether the given value is an instance or subclass of TraitType.""" |
| 197 | return isinstance(t, TraitType) or (isinstance(t, type) and issubclass(t, TraitType)) |
| 198 | |
| 199 | |
| 200 | def parse_notifier_name(names: Sentinel | str | t.Iterable[Sentinel | str]) -> t.Iterable[t.Any]: |