MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / _clean_settings

Function _clean_settings

mongoengine/connection.py:329–350  ·  view source on GitHub ↗
(settings_dict)

Source from the content-addressed store, hash-verified

327 raise ConnectionFailure(msg)
328
329 def _clean_settings(settings_dict):
330 if PYMONGO_VERSION < (4,):
331 irrelevant_fields_set = {
332 "name",
333 "username",
334 "password",
335 "authentication_source",
336 "authentication_mechanism",
337 "authmechanismproperties",
338 }
339 rename_fields = {}
340 else:
341 irrelevant_fields_set = {"name"}
342 rename_fields = {
343 "authentication_source": "authSource",
344 "authentication_mechanism": "authMechanism",
345 }
346 return {
347 rename_fields.get(k, k): v
348 for k, v in settings_dict.items()
349 if k not in irrelevant_fields_set and v is not None
350 }
351
352 raw_conn_settings = _connection_settings[alias].copy()
353

Callers 2

get_connectionFunction · 0.85

Calls 2

itemsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected