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

Function format_timeout_details

pymongo/helpers_shared.py:128–137  ·  view source on GitHub ↗
(details: Optional[dict[str, float]])

Source from the content-addressed store, hash-verified

126
127
128def format_timeout_details(details: Optional[dict[str, float]]) -> str:
129 result = ""
130 if details:
131 result += " (configured timeouts:"
132 for timeout in ["socketTimeoutMS", "timeoutMS", "connectTimeoutMS"]:
133 if timeout in details:
134 result += f" {timeout}: {details[timeout]}ms,"
135 result = result[:-1]
136 result += ")"
137 return result
138
139
140def _gen_index_name(keys: _IndexList) -> str:

Callers 4

apply_timeoutMethod · 0.90
apply_timeoutMethod · 0.90
_check_command_responseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected