style: apply black formatting

This commit is contained in:
ykd007
2026-05-14 21:34:14 +05:30
parent 68ef73e528
commit dc24d91250
2 changed files with 4 additions and 4 deletions
+1 -3
View File
@@ -70,9 +70,7 @@ def _normalize_google_sheets_url(url: str) -> str:
gid_match = re.search(r"gid=(\d+)", url)
gid_suffix = f"&gid={gid_match.group(1)}" if gid_match else ""
export_url = (
f"https://docs.google.com/spreadsheets/d/{sheet_id}/export?format=csv{gid_suffix}"
)
export_url = f"https://docs.google.com/spreadsheets/d/{sheet_id}/export?format=csv{gid_suffix}"
logger.info(f"Converting Google Sheets URL to CSV export: {export_url}")
return export_url
+3 -1
View File
@@ -18,7 +18,9 @@ class TestNormalizeGoogleSheetsUrl:
def test_edit_url_no_gid(self):
url = "https://docs.google.com/spreadsheets/d/ABC123/edit"
result = _normalize_google_sheets_url(url)
assert result == "https://docs.google.com/spreadsheets/d/ABC123/export?format=csv"
assert (
result == "https://docs.google.com/spreadsheets/d/ABC123/export?format=csv"
)
def test_already_export_url_unchanged(self):
url = "https://docs.google.com/spreadsheets/d/ABC123/export?format=csv"