mirror of
https://github.com/apache/superset.git
synced 2026-04-10 11:55:24 +00:00
chore(pre-commit): Add pyupgrade and pycln hooks (#24197)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Dict, Optional, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from pandas import DataFrame
|
||||
from sqlalchemy.inspection import inspect
|
||||
@@ -63,10 +63,10 @@ class PandasDataLoader(DataLoader):
|
||||
schema=self._detect_schema_name(),
|
||||
)
|
||||
|
||||
def _detect_schema_name(self) -> Optional[str]:
|
||||
def _detect_schema_name(self) -> str | None:
|
||||
return inspect(self._db_engine).default_schema_name
|
||||
|
||||
def _take_data_types(self, table: Table) -> Optional[Dict[str, str]]:
|
||||
def _take_data_types(self, table: Table) -> dict[str, str] | None:
|
||||
if metadata_table := table.table_metadata:
|
||||
types = metadata_table.types
|
||||
if types:
|
||||
|
||||
Reference in New Issue
Block a user