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

Function truth_value

pymongo/uri_parser_shared.py:292–297  ·  view source on GitHub ↗
(val: Any)

Source from the content-addressed store, hash-verified

290 if "ssl" in options and "tls" in options:
291
292 def truth_value(val: Any) -> Any:
293 if val in ("true", "false"):
294 return val == "true"
295 if isinstance(val, bool):
296 return val
297 return val
298
299 if truth_value(options.get("ssl")) != truth_value(options.get("tls")):
300 err_msg = "Can not specify conflicting values for URI options %s and %s."

Callers 1

_handle_security_optionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected