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

Function _validate_canonicalize_host_name

pymongo/auth_shared.py:90–97  ·  view source on GitHub ↗
(value: str | bool)

Source from the content-addressed store, hash-verified

88
89
90def _validate_canonicalize_host_name(value: str | bool) -> str | bool:
91 valid_names = [False, True, "none", "forward", "forwardAndReverse"]
92 if value in ["true", "false", True, False]:
93 return value in ["true", True]
94
95 if value not in valid_names:
96 raise ValueError(f"CANONICALIZE_HOST_NAME '{value}' not in valid options: {valid_names}")
97 return value
98
99
100def _build_credentials_tuple(

Callers 2

_build_credentials_tupleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected