From 474851d9c0b2c5b60b5291bfd51f017a5ec181a9 Mon Sep 17 00:00:00 2001 From: alifeee Date: Tue, 24 Sep 2024 17:58:48 +0100 Subject: [PATCH] small opinion changes --- gspread/worksheet.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gspread/worksheet.py b/gspread/worksheet.py index 783204e2..43a9f691 100644 --- a/gspread/worksheet.py +++ b/gspread/worksheet.py @@ -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. @@ -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})