|
2 | 2 | from functools import partial
|
3 | 3 | from io import BytesIO
|
4 | 4 | from itertools import zip_longest
|
5 |
| -from operator import attrgetter |
6 | 5 |
|
7 | 6 | import numpy as np
|
8 | 7 | import pandas as pd
|
@@ -393,17 +392,18 @@ def _gspread_sync(source, gspread_url, gspread_auth_key):
|
393 | 392 | worksheet.freeze(0, 0)
|
394 | 393 | worksheet.resize(rows=n_rows + 1, cols=n_cols)
|
395 | 394 | worksheet.clear_notes(global_range)
|
396 |
| - white_background = dict( |
397 |
| - backgroundColorStyle=dict(rgbColor=dict(red=1, green=1, blue=1, alpha=1)) |
| 395 | + reset_format = dict( |
| 396 | + backgroundColorStyle=dict(rgbColor=dict(red=1, green=1, blue=1, alpha=1)), |
| 397 | + textFormat=dict(bold=False), |
398 | 398 | )
|
399 |
| - worksheet.format(global_range, white_background) |
| 399 | + worksheet.format(global_range, reset_format) |
400 | 400 | except gspread.WorksheetNotFound:
|
401 | 401 | worksheet = sheet.add_worksheet(
|
402 | 402 | GOOGLE_WORKSHEET_NAME, rows=n_rows + 1, cols=n_cols
|
403 | 403 | )
|
404 | 404 | # ensure worksheets are sorted anti-alphabetically
|
405 | 405 | sheet.reorder_worksheets(
|
406 |
| - sorted(sheet.worksheets(), key=attrgetter("title"), reverse=True) |
| 406 | + sorted(sheet.worksheets(), key=lambda worksheet: worksheet.title.lower()) |
407 | 407 | )
|
408 | 408 |
|
409 | 409 | # upload all values
|
|
0 commit comments