Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patchwork PR: GenerateDocstring #836

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions patchwork/steps/Combine/Combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@

class Combine(Step):
def __init__(self, inputs):
"""Initialize a CombineInputs instance.

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 the dictionary is merged with each item in the list.
"""
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:
Expand Down
Loading