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

Method setup_instance

traitlets/traitlets.py:1335–1343  ·  view source on GitHub ↗
(self, /, *args: t.Any, **kwargs: t.Any)

Source from the content-addressed store, hash-verified

1333 _all_trait_default_generators: dict[str, t.Any]
1334
1335 def setup_instance(self, /, *args: t.Any, **kwargs: t.Any) -> None:
1336 # although we'd prefer to set only the initial values not present
1337 # in kwargs, we will overwrite them in `__init__`, and simply making
1338 # a copy of a dict is faster than checking for each key.
1339 self._trait_values = self._static_immutable_initial_values.copy()
1340 self._trait_notifiers = {}
1341 self._trait_validators = {}
1342 self._cross_validation_lock = False
1343 super(HasTraits, self).setup_instance(*args, **kwargs)
1344
1345 def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
1346 # Allow trait values to be set using keyword arguments.

Callers 1

__new__Method · 0.45

Calls 1

copyMethod · 0.80

Tested by

no test coverage detected