chore(pre-commit): Add pyupgrade and pycln hooks (#24197)

This commit is contained in:
John Bodley
2023-06-01 12:01:10 -07:00
committed by GitHub
parent 7d7ce63970
commit a4d5d7c6b9
448 changed files with 3084 additions and 3305 deletions

View File

@@ -18,7 +18,8 @@ import json
import logging
import os
import time
from typing import Any, Callable, Dict, Iterator, Optional, Union
from collections.abc import Iterator
from typing import Any, Callable, Optional, Union
from uuid import uuid4
from alembic import op
@@ -127,7 +128,7 @@ def paginated_update(
print_page_progress(processed, total)
def try_load_json(data: Optional[str]) -> Dict[str, Any]:
def try_load_json(data: Optional[str]) -> dict[str, Any]:
try:
return data and json.loads(data) or {}
except json.decoder.JSONDecodeError: