Validates and normalizes options passed in a MongoDB URI. Returns a new dictionary of validated and normalized options. If warn is False then errors will be thrown for invalid options, otherwise they will be ignored and a warning will be issued. :param opts: A dict of MongoDB URI o
(opts: Mapping[str, Any], warn: bool = False)
| 365 | |
| 366 | |
| 367 | def validate_options(opts: Mapping[str, Any], warn: bool = False) -> MutableMapping[str, Any]: |
| 368 | """Validates and normalizes options passed in a MongoDB URI. |
| 369 | |
| 370 | Returns a new dictionary of validated and normalized options. If warn is |
| 371 | False then errors will be thrown for invalid options, otherwise they will |
| 372 | be ignored and a warning will be issued. |
| 373 | |
| 374 | :param opts: A dict of MongoDB URI options. |
| 375 | :param warn: If ``True`` then warnings will be logged and |
| 376 | invalid options will be ignored. Otherwise invalid options will |
| 377 | cause errors. |
| 378 | """ |
| 379 | return get_validated_options(opts, warn) |
| 380 | |
| 381 | |
| 382 | def split_options( |
no test coverage detected