mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
refactor(chart.commands): separate commands into two different modules (#17509)
refactor: move imports under TYPE_CHECKING
This commit is contained in:
@@ -14,7 +14,9 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from typing import List, Optional
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import List, Optional, TYPE_CHECKING
|
||||
|
||||
from flask_appbuilder.security.sqla.models import Role, User
|
||||
|
||||
@@ -23,11 +25,13 @@ from superset.commands.exceptions import (
|
||||
OwnersNotFoundValidationError,
|
||||
RolesNotFoundValidationError,
|
||||
)
|
||||
from superset.connectors.base.models import BaseDatasource
|
||||
from superset.connectors.connector_registry import ConnectorRegistry
|
||||
from superset.datasets.commands.exceptions import DatasetNotFoundError
|
||||
from superset.extensions import db, security_manager
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from superset.connectors.base.models import BaseDatasource
|
||||
|
||||
|
||||
def populate_owners(
|
||||
user: User, owner_ids: Optional[List[int]], default_to_user: bool,
|
||||
|
||||
Reference in New Issue
Block a user