MCPcopy
hub / github.com/pydantic/pydantic / get_values_dict

Method get_values_dict

pydantic/mypy.py:1231–1236  ·  view source on GitHub ↗

Returns a dict of Pydantic model config names to their values. It includes the config if config value is not `None`.

(self)

Source from the content-addressed store, hash-verified

1229 self.strict = strict
1230
1231 def get_values_dict(self) -> dict[str, Any]:
1232 """Returns a dict of Pydantic model config names to their values.
1233
1234 It includes the config if config value is not `None`.
1235 """
1236 return {k: v for k, v in self.__dict__.items() if v is not None}
1237
1238 def update(self, config: ModelConfigData | None) -> None:
1239 """Update Pydantic model config values."""

Callers 2

transformMethod · 0.80
updateMethod · 0.80

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected