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)
| 15 | |
| 16 | |
| 17 | def 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 | |
| 30 | def unique_keys(all_urls): |
no test coverage detected