Skip to content

Commit

Permalink
small opinion changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alifeee committed Sep 24, 2024
1 parent f5a6360 commit 474851d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gspread/worksheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2616,9 +2616,9 @@ def batch_merge(
:param merges: list of dictionaries with the ranges(is A1-notation), and
an optional ``MergeType`` field.
See `MergeType`_ in the Sheets API reference.
:type merges: List[Dict[Literal["range", "mergeType"], Union[str | MergeType]]]
:type merges: List[Dict[Literal["range", "mergeType"], Union[str, MergeType]]]
:params merge_type: (optional) default ``MergeType`` for all merges missing the merges.
defaults to ``MergeType.merge_row``.
defaults to ``MergeType.merge_all``.
:type merge_type: ``MergeType``
:returns: The body of the request response.
Expand All @@ -2628,11 +2628,11 @@ def batch_merge(
requests = [
{
"mergeCells": {
"range": a1_range_to_grid_range(i["range"], self.id),
"mergeType": i.get("mergeType", merge_type),
"range": a1_range_to_grid_range(merge["range"], self.id),
"mergeType": merge.get("mergeType", merge_type),
}
}
for i in merges
for merge in merges
]

return self.client.batch_update(self.spreadsheet_id, {"requests": requests})
Expand Down

0 comments on commit 474851d

Please sign in to comment.