MCPcopy Index your code
hub / github.com/fastapi/fastapi / deep_dict_update

Function deep_dict_update

fastapi/utils.py:103–118  ·  view source on GitHub ↗
(main_dict: dict[Any, Any], update_dict: dict[Any, Any])

Source from the content-addressed store, hash-verified

101
102
103def 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
121def get_value_or_default(

Callers 1

get_openapi_pathFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…