| 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. |