MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / update

Method update

bson/son.py:162–176  ·  view source on GitHub ↗
(self, other: Optional[Any] = None, **kwargs: _Value)

Source from the content-addressed store, hash-verified

160 return (k, v)
161
162 def update(self, other: Optional[Any] = None, **kwargs: _Value) -> None:
163 # Make progressively weaker assumptions about "other"
164 if other is None:
165 pass
166 elif hasattr(other, "items"):
167 for k, v in other.items():
168 self[k] = v
169 elif hasattr(other, "keys"):
170 for k in other:
171 self[k] = other[k]
172 else:
173 for k, v in other:
174 self[k] = v
175 if kwargs:
176 self.update(kwargs)
177
178 def get( # type: ignore[override]
179 self, key: _Key, default: Optional[Union[_Value, _T]] = None

Callers 15

_create_userFunction · 0.95
set_fail_pointFunction · 0.95
_create_userFunction · 0.95
set_fail_pointMethod · 0.95
setFailPointMethod · 0.95
repl_set_step_downFunction · 0.95
async_set_fail_pointFunction · 0.95
_create_userFunction · 0.95
set_fail_pointMethod · 0.95
setFailPointMethod · 0.95

Calls 1

itemsMethod · 0.80

Tested by 15

set_fail_pointMethod · 0.76
setFailPointMethod · 0.76
set_fail_pointMethod · 0.76
setFailPointMethod · 0.76
run_scenarioFunction · 0.36
_test_app_errorMethod · 0.36
fail_pointMethod · 0.36
test_parse_uriMethod · 0.36
run_testMethod · 0.36
tearDownMethod · 0.36