Skip to content

Commit

Permalink
make get_values call get with default kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
alifeee committed Oct 19, 2023
1 parent 63b6197 commit d882420
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions gspread/worksheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
T,
ValueInputOption,
ValueRenderOption,
GridRangeType,
a1_range_to_grid_range,
a1_to_rowcol,
absolute_range_name,
Expand Down Expand Up @@ -381,9 +382,14 @@ def range(self, name: str = "") -> List[Cell]:
for j, value in enumerate(row)
]

def get_values(self, *args, **kwargs) -> ValueRange:
"""Alias for :meth:`~gspread.worksheet.Worksheet.get`"""
return self.get(*args, **kwargs)
def get_values(self, *args, **kwargs) -> List[List[T]]:
"""Alias for :meth:`~gspread.worksheet.Worksheet.get`...
with ``return_type`` set to ``List[List[Any]]``
and ``pad_values`` set to ``True``
(legacy method)
"""
return self.get(*args, pad_values=True, return_type=GridRangeType.ListOfLists, **kwargs)

def get_all_values(self, *args, **kwargs) -> ValueRange:
"""Alias to :meth:`~gspread.worksheet.Worksheet.get_values`"""
Expand Down

0 comments on commit d882420

Please sign in to comment.