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

Update (and test for) internal properties on change #1211

Merged
merged 11 commits into from
Jun 8, 2023

Conversation

alifeee
Copy link
Collaborator

@alifeee alifeee commented Jun 7, 2023

Closes #1201
Many internal properties were not updated
These updates were also not tested for in the tests.
More info in #1201

@alifeee
Copy link
Collaborator Author

alifeee commented Jun 7, 2023

Currently this line fails.

new_sheet.hide() calls hide()

this calls _set_hidden_flag(True)

this sets _properties["hidden"] to True. I verify this happens via print()

Then, isSheetHidden attempts to get "hidden" prop.

ok, I figured out the problem was that in the test_hide_show_worksheet test, a sheet is added, and the new sheet is hidden/shown. The properties were of the old sheet. Fixed. I will leave this comment here.

Copy link
Collaborator

@lavigne958 lavigne958 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good To Me

@alifeee
Copy link
Collaborator Author

alifeee commented Jun 14, 2023

Here are all @propertys of gspread.Worksheet.

Worksheet properties - what changes them - whether this method updates local prop: ✅/❌

  • id - not updated
  • title - update_title - ✅
  • url - not updated
  • index - update_index - ✅
  • isSheetHidden - _set_hidden_flag - ✅
  • updated - deprecated
  • row_count - resize - ✅
  • col_count - resize - ✅
  • frozen_row_count - freeze - ✅
  • frozen_col_count - freeze - ✅
  • is_gridlines_hidden - _set_gridlines_hidden_flag - ✅
  • tab_color - update_tab_color - ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Worksheet.isSheetHidden is not updated when Worksheet.hide() or Worksheet.show() used
2 participants