mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
[mypy] Enforcing typing for db_engine_specs (#9138)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from datetime import datetime
|
||||
from typing import List, Optional, Tuple, TYPE_CHECKING
|
||||
from typing import Any, List, Optional, Tuple, TYPE_CHECKING
|
||||
|
||||
from pytz import _FixedOffset # type: ignore
|
||||
from sqlalchemy.dialects.postgresql.base import PGInspector
|
||||
@@ -51,7 +51,7 @@ class PostgresBaseEngineSpec(BaseEngineSpec):
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def fetch_data(cls, cursor, limit: int) -> List[Tuple]:
|
||||
def fetch_data(cls, cursor: Any, limit: int) -> List[Tuple]:
|
||||
cursor.tzinfo_factory = FixedOffsetTimezone
|
||||
if not cursor.description:
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user