From 502937fd7ece6866199f93f4e8082f5a224e74d0 Mon Sep 17 00:00:00 2001 From: "patched.codes[bot]" <298395+patched.codes[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 02:54:25 +0000 Subject: [PATCH] Patched /tmp/tmps5gx0h8h/patchwork/steps/Combine/Combine.py --- patchwork/steps/Combine/Combine.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/patchwork/steps/Combine/Combine.py b/patchwork/steps/Combine/Combine.py index 2c0cc499..773f3c8a 100644 --- a/patchwork/steps/Combine/Combine.py +++ b/patchwork/steps/Combine/Combine.py @@ -6,6 +6,27 @@ class Combine(Step): def __init__(self, inputs): + """Initialize a CombineInputs instance. + + Args: + inputs (dict): A dictionary containing the input data for initialization. + + Returns: + None + + Raises: + """Merges two JSON objects or lists of JSON objects. + + Args: + self: The instance of the class containing base and update attributes. + + Returns: + dict or list: The merged result. If both inputs are dictionaries, returns a merged dictionary. + If both inputs are lists, returns a list of merged dictionaries. If one input is a list and + the other is a dictionary, returns a list where each element of the list is merged with the dictionary. + """ + ValueError: If any required keys are missing from the inputs dictionary. + """ super().__init__(inputs) missing_keys = CombineInputs.__required_keys__.difference(inputs.keys()) if len(missing_keys) > 0: