From 080c7cf18dbae1b7759bc582c699dbcb560cda8f 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:44:18 +0000 Subject: [PATCH] Patched /tmp/tmpgmapi_4_/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 2c0cc4992..226ebe188 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 the CombineInputs class. + + Args: + inputs (dict): A dictionary containing the required input data. + + 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: