chore(pre-commit): Add pyupgrade and pycln hooks (#24197)

This commit is contained in:
John Bodley
2023-06-01 12:01:10 -07:00
committed by GitHub
parent 7d7ce63970
commit a4d5d7c6b9
448 changed files with 3084 additions and 3305 deletions

View File

@@ -17,7 +17,7 @@
from __future__ import annotations
import logging
from typing import Optional, TYPE_CHECKING
from typing import TYPE_CHECKING
from flask import current_app
@@ -32,7 +32,7 @@ logger = logging.getLogger(__name__)
# TODO: duplicate code with DatabaseDao, below function should be moved or use dao
def get_or_create_db(
database_name: str, sqlalchemy_uri: str, always_create: Optional[bool] = True
database_name: str, sqlalchemy_uri: str, always_create: bool | None = True
) -> Database:
# pylint: disable=import-outside-toplevel
from superset import db