MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / remove_function_key

Function remove_function_key

botasaurus/links.py:17–27  ·  view source on GitHub ↗

Removes the 'function' key from each dictionary in the list. :param data_list: List of dictionaries, each potentially containing a 'function' key. :return: A new list of dictionaries, each without the 'function' key.

(data_list)

Source from the content-addressed store, hash-verified

15
16
17def remove_function_key(data_list):
18 """
19 Removes the 'function' key from each dictionary in the list.
20
21 :param data_list: List of dictionaries, each potentially containing a 'function' key.
22 :return: A new list of dictionaries, each without the 'function' key.
23 """
24 return [
25 {key: value for key, value in item.items() if key != "function"}
26 for item in data_list
27 ]
28
29
30def unique_keys(all_urls):

Callers 1

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected