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

Method __contains__

traitlets/config/loader.py:756–765  ·  view source on GitHub ↗
(self, key: t.Any)

Source from the content-addressed store, hash-verified

754 )
755
756 def __contains__(self, key: t.Any) -> bool:
757 if "=" in key:
758 return False
759 if super().__contains__(key):
760 return True
761
762 if key.startswith("-") and class_trait_opt_pattern.match(key):
763 self._add_kv_action(key)
764 return True
765 return False
766
767 def __getitem__(self, key: str) -> t.Any:
768 if key in self:

Callers

nothing calls this directly

Calls 2

_add_kv_actionMethod · 0.95
__contains__Method · 0.45

Tested by

no test coverage detected