mirror of https://github.com/apache/superset.git
remove redundant dataclass
This commit is contained in:
parent
7ab1f48c14
commit
d3d3565592
|
@ -58,9 +58,9 @@ class CreateDashboardPermalinkCommand(BaseDashboardPermalinkCommand):
|
||||||
user_id = get_user_id()
|
user_id = get_user_id()
|
||||||
entry = KeyValueDAO.upsert_entry(
|
entry = KeyValueDAO.upsert_entry(
|
||||||
resource=self.resource,
|
resource=self.resource,
|
||||||
|
key=get_deterministic_uuid(self.salt, (user_id, value)),
|
||||||
value=value,
|
value=value,
|
||||||
codec=self.codec,
|
codec=self.codec,
|
||||||
key=get_deterministic_uuid(self.salt, (user_id, value)),
|
|
||||||
)
|
)
|
||||||
db.session.flush()
|
db.session.flush()
|
||||||
assert entry.id # for type checks
|
assert entry.id # for type checks
|
||||||
|
|
|
@ -19,7 +19,6 @@ from __future__ import annotations
|
||||||
import json
|
import json
|
||||||
import pickle
|
import pickle
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from dataclasses import dataclass
|
|
||||||
from typing import Any, TypedDict
|
from typing import Any, TypedDict
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
@ -32,12 +31,6 @@ from superset.key_value.exceptions import (
|
||||||
from superset.utils.backports import StrEnum
|
from superset.utils.backports import StrEnum
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class Key:
|
|
||||||
id: int | None
|
|
||||||
uuid: UUID | None
|
|
||||||
|
|
||||||
|
|
||||||
class KeyValueFilter(TypedDict, total=False):
|
class KeyValueFilter(TypedDict, total=False):
|
||||||
resource: str
|
resource: str
|
||||||
id: int | None
|
id: int | None
|
||||||
|
|
Loading…
Reference in New Issue