Skip to content

Commit

Permalink
removed getters and cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
muddi900 committed Oct 26, 2024
1 parent 7d739b5 commit 810505d
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions gspread/worksheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,9 @@ def __init__(
# kept for backward compatibility - publicly available
# do not use if possible.
self._spreadsheet = spreadsheet
self._column_headers = []

@property
def column_headers(self) -> List[str]:
if not self._column_headers:
self._column_headers = self.row_values(1)
return self._column_headers

@column_headers.setter
def column_headers(self, value: List[str]) -> None:
self._column_headers = value
def get_column_headers(self, header_row: Optional[int] = None) -> List[str]:
return self.row_values(header_row or 1)

def __repr__(self) -> str:
return "<{} {} id:{}>".format(
Expand Down

0 comments on commit 810505d

Please sign in to comment.