update_cells response values in input order#1565
update_cells response values in input order#1565xoiga123 wants to merge 4 commits intoburnash:masterfrom
update_cells response values in input order#1565Conversation
|
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.
No, this adds a flag
Yeah I added Tbh I didn't know there was a contributing guide because I only skimmed the readme, wouldn't it make more sense to move |
|
sorry, I do not have much time to review PRs right now. I hope that is okay :] — I am discussing gspread maintenance with @lavigne958. |
This PR modifies the update_cells method to return response values in the same order as the input cells, rather than as a rectangular grid. Key changes: - Adds include_values_in_response flag to Worksheet.update_cells - When enabled, returns updated cell values in original input sequence - Previously returned values as 2D array structure, now returns flat list matching input order - Example: [Cell(1,1), Cell(2,1), Cell(1,2)] returns ['A', 'C', 'B'] instead of [['A', 'B'], ['C']] Status: Safe to merge - backward compatible (parameter defaults to None), includes tests
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.