MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / getter

Function getter

gridfs/grid_file_shared.py:47–55  ·  view source on GitHub ↗
(self: Any)

Source from the content-addressed store, hash-verified

45 )
46
47 def getter(self: Any) -> Any:
48 if warn_str:
49 warnings.warn(warn_str, stacklevel=2, category=DeprecationWarning)
50 if closed_only and not self._closed:
51 raise AttributeError("can only get %r on a closed file" % field_name)
52 # Protect against PHP-237
53 if field_name == "length":
54 return self._file.get(field_name, 0)
55 return self._file.get(field_name, None)
56
57 def setter(self: Any, value: Any) -> Any:
58 if warn_str:

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected