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

Function is_trait

traitlets/traitlets.py:195–197  ·  view source on GitHub ↗

Returns whether the given value is an instance or subclass of TraitType.

(t: t.Any)

Source from the content-addressed store, hash-verified

193
194
195def 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
200def parse_notifier_name(names: Sentinel | str | t.Iterable[Sentinel | str]) -> t.Iterable[t.Any]:

Callers 3

__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…