mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore(pre-commit): Add pyupgrade and pycln hooks (#24197)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user