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

Function setter

gridfs/grid_file_shared.py:57–64  ·  view source on GitHub ↗
(self: Any, value: Any)

Source from the content-addressed store, hash-verified

55 return self._file.get(field_name, None)
56
57 def setter(self: Any, value: Any) -> Any:
58 if warn_str:
59 warnings.warn(warn_str, stacklevel=2, category=DeprecationWarning)
60 if self._closed:
61 raise InvalidOperation(
62 "AsyncGridIn does not support __setattr__ after being closed(). Set the attribute before closing the file or use AsyncGridIn.set() instead"
63 )
64 self._file[field_name] = value
65
66 if read_only:
67 docstring += "\n\nThis attribute is read-only."

Callers

nothing calls this directly

Calls 2

InvalidOperationClass · 0.90
update_oneMethod · 0.45

Tested by

no test coverage detected