fix: Python3.11 (str, Enum) issue (#24803)

This commit is contained in:
EugeneTorap
2023-07-31 19:04:09 +03:00
committed by Michael S. Molina
parent b5df3f9e4e
commit 161e05445c
15 changed files with 81 additions and 52 deletions

View File

@@ -14,10 +14,10 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from enum import Enum
from superset.utils.backports import StrEnum
class ChartDataResultFormat(str, Enum):
class ChartDataResultFormat(StrEnum):
"""
Chart data response format
"""
@@ -31,7 +31,7 @@ class ChartDataResultFormat(str, Enum):
return {cls.CSV} | {cls.XLSX}
class ChartDataResultType(str, Enum):
class ChartDataResultType(StrEnum):
"""
Chart data response type
"""

View File

@@ -14,10 +14,10 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from enum import Enum
from superset.utils.backports import StrEnum
class QueryStatus(str, Enum):
class QueryStatus(StrEnum):
"""Enum-type class for query statuses"""
STOPPED: str = "stopped"