mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix: mypy issue on py3.9 + prevent similar issues (#29864)
This commit is contained in:
committed by
GitHub
parent
fede4f9f1b
commit
c7dc4dc7fc
@@ -17,7 +17,7 @@
|
||||
|
||||
import logging
|
||||
import uuid
|
||||
from typing import Any
|
||||
from typing import Any, Union
|
||||
|
||||
from flask import current_app
|
||||
|
||||
@@ -34,7 +34,7 @@ class BaseDistributedLockCommand(BaseCommand):
|
||||
codec = JsonKeyValueCodec()
|
||||
resource = KeyValueResource.LOCK
|
||||
|
||||
def __init__(self, namespace: str, params: dict[str, Any] | None = None):
|
||||
def __init__(self, namespace: str, params: Union[dict[str, Any], None] = None):
|
||||
self.key = get_key(namespace, **(params or {}))
|
||||
|
||||
def validate(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user