`update_cells` response values in input order
from gspread import Cell
cells = [
Cell(row=1, col=1, value="A"),
Cell(row=2, col=1, value="C"),
Cell(row=1, col=2, value="B"),
]
result = ws.update_cells(cells, include_values_in_response=True)
print(result["updatedData"]["values"])
# ['A', 'C', 'B']
The original response would be
# [['A', 'B'], ['C']]
which wouldn't be intuitive when the user is already using a higher-level wrapper like update_cells, they passed a list of cells in (order may matter) and now they get a rect of cells back.
hi ! thanks for the PR ! sorry about the annoying linting hehe…
I will look at this properly in the coming time, but from a glance: is this a breaking change? can we add a test to test the behavour?
@alifeee Hey sorry for the late reply, life can be a bother sometimes.
is this a breaking change?
No, this adds a flag include_values_in_response which defaults to None to Worksheet.update_values, so all previous code that didn't use it will be fine.
can we add a test to test the behavour?
Yeah I added test_update_cells_response_values, thanks for the reminder.
Tbh I didn't know there was a contributing guide because I only skimmed the readme, wouldn't it make more sense to move CODE_OF_CONDUCT.md and CONTRIBUTING.md outside of .github folder? I think most repos are structured that way, and I got conditioned into thinking we don't have a guide.
sorry, I do not have much time to review PRs right now. I hope that is okay :] — I am discussing gspread maintenance with @lavigne958.