(main_dict: dict[Any, Any], update_dict: dict[Any, Any])
| 101 | |
| 102 | |
| 103 | def deep_dict_update(main_dict: dict[Any, Any], update_dict: dict[Any, Any]) -> None: |
| 104 | for key, value in update_dict.items(): |
| 105 | if ( |
| 106 | key in main_dict |
| 107 | and isinstance(main_dict[key], dict) |
| 108 | and isinstance(value, dict) |
| 109 | ): |
| 110 | deep_dict_update(main_dict[key], value) |
| 111 | elif ( |
| 112 | key in main_dict |
| 113 | and isinstance(main_dict[key], list) |
| 114 | and isinstance(update_dict[key], list) |
| 115 | ): |
| 116 | main_dict[key] = main_dict[key] + update_dict[key] |
| 117 | else: |
| 118 | main_dict[key] = value |
| 119 | |
| 120 | |
| 121 | def get_value_or_default( |
no outgoing calls
no test coverage detected
searching dependent graphs…