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

Function parse_collection_options

test/utils_shared.py:448–460  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

446
447
448def parse_collection_options(opts):
449 if "readPreference" in opts:
450 opts["read_preference"] = parse_read_preference(opts.pop("readPreference"))
451
452 if "writeConcern" in opts:
453 opts["write_concern"] = WriteConcern(**dict(opts.pop("writeConcern")))
454
455 if "readConcern" in opts:
456 opts["read_concern"] = ReadConcern(**dict(opts.pop("readConcern")))
457
458 if "timeoutMS" in opts:
459 opts["timeout"] = int(opts.pop("timeoutMS")) / 1000.0
460 return opts
461
462
463@contextlib.contextmanager

Callers 1

Calls 4

WriteConcernClass · 0.90
ReadConcernClass · 0.90
parse_read_preferenceFunction · 0.85
popMethod · 0.45

Tested by

no test coverage detected