MCPcopy Index your code
hub / github.com/nonebot/nonebot2 / extra

Method extra

nonebot/compat.py:129–139  ·  view source on GitHub ↗

Extra data that is not part of the standard pydantic fields. For compatibility with pydantic v1.

(self)

Source from the content-addressed store, hash-verified

127
128 @property
129 def extra(self) -> dict[str, Any]:
130 """Extra data that is not part of the standard pydantic fields.
131
132 For compatibility with pydantic v1.
133 """
134 # extract extra data from attributes set except used slots
135 # we need to call super in advance due to
136 # comprehension not inlined in cpython < 3.12
137 # https://peps.python.org/pep-0709/
138 slots = super().__slots__
139 return {k: v for k, v in self._attributes_set.items() if k not in slots}
140
141 @classmethod
142 def _inherit_construct(

Callers

nothing calls this directly

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected