MCPcopy Index your code
hub / github.com/couchbase/couchbase-python-client / get_valid_multi_args

Function get_valid_multi_args

couchbase/logic/options.py:184–210  ·  view source on GitHub ↗
(
    opt_type,  # type: OptionsBase
    arg_vars,  # type: Optional[Dict[str,Any]]
    *options  # type: OptionsBase
)

Source from the content-addressed store, hash-verified

182
183
184def get_valid_multi_args(
185 opt_type, # type: OptionsBase
186 arg_vars, # type: Optional[Dict[str,Any]]
187 *options # type: OptionsBase
188) -> Dict[str, Any]:
189
190 temp_options = _get_temp_opts(arg_vars, *options)
191 valid_opt_keys = opt_type.get_valid_keys()
192
193 final_opts = _get_valid_global_multi_opts(temp_options, valid_opt_keys)
194
195 if not temp_options:
196 return final_opts
197
198 per_key_opts = temp_options.pop('per_key_options', None)
199 if not per_key_opts:
200 return final_opts
201
202 durability = final_opts.get('durability', None)
203 durability_type = None
204 if durability is not None:
205 durability_type = dict if isinstance(durability, dict) else int
206
207 final_key_opts = _get_per_key_opts(per_key_opts, opt_type, valid_opt_keys, durability_type)
208
209 final_opts['per_key_options'] = final_key_opts
210 return final_opts
211
212
213"""

Calls 6

_get_temp_optsFunction · 0.85
_get_per_key_optsFunction · 0.85
get_valid_keysMethod · 0.45
popMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected