mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
chore: enable ruff's isort equivalent (#28267)
This commit is contained in:
committed by
GitHub
parent
fe37d914e5
commit
3ac387bb66
@@ -25,8 +25,8 @@ from inspect import (
|
||||
isclass,
|
||||
isfunction,
|
||||
ismethod,
|
||||
signature,
|
||||
Signature,
|
||||
signature,
|
||||
)
|
||||
from logging import Logger
|
||||
from typing import Any, Callable, cast, Union
|
||||
|
||||
@@ -23,7 +23,9 @@ from flask_appbuilder.security.sqla.models import User
|
||||
from sqlalchemy.orm import Session # noqa: F401
|
||||
|
||||
from superset import db
|
||||
from superset.commands.dashboard.exceptions import DashboardAccessDeniedError # noqa: F401
|
||||
from superset.commands.dashboard.exceptions import (
|
||||
DashboardAccessDeniedError, # noqa: F401
|
||||
)
|
||||
from superset.commands.temporary_cache.entry import Entry
|
||||
from superset.extensions import cache_manager
|
||||
from superset.models.dashboard import Dashboard
|
||||
|
||||
@@ -23,7 +23,9 @@ from flask_appbuilder.security.sqla.models import User # noqa: F401
|
||||
from sqlalchemy.orm import Session # noqa: F401
|
||||
|
||||
from superset import db
|
||||
from superset.commands.dashboard.exceptions import DashboardAccessDeniedError # noqa: F401
|
||||
from superset.commands.dashboard.exceptions import (
|
||||
DashboardAccessDeniedError, # noqa: F401
|
||||
)
|
||||
from superset.key_value.models import KeyValueEntry
|
||||
from superset.key_value.types import KeyValueResource
|
||||
from superset.key_value.utils import decode_permalink_id
|
||||
|
||||
@@ -45,7 +45,9 @@ from tests.integration_tests.fixtures.birth_names_dashboard import (
|
||||
load_birth_names_dashboard_with_slices, # noqa: F401
|
||||
load_birth_names_data, # noqa: F401
|
||||
)
|
||||
from tests.integration_tests.fixtures.public_role import public_role_like_gamma # noqa: F401
|
||||
from tests.integration_tests.fixtures.public_role import (
|
||||
public_role_like_gamma, # noqa: F401
|
||||
)
|
||||
from tests.integration_tests.fixtures.query_context import get_query_context
|
||||
from tests.integration_tests.fixtures.world_bank_dashboard import (
|
||||
load_world_bank_dashboard_with_slices, # noqa: F401
|
||||
|
||||
@@ -46,7 +46,10 @@ from superset.utils.core import backend, get_example_default_schema
|
||||
from superset.utils.database import get_example_database, get_main_database
|
||||
from superset.utils.dict_import_export import export_to_dict
|
||||
from tests.integration_tests.base_tests import SupersetTestCase
|
||||
from tests.integration_tests.conftest import CTAS_SCHEMA_NAME, with_feature_flags # noqa: F401
|
||||
from tests.integration_tests.conftest import ( # noqa: F401
|
||||
CTAS_SCHEMA_NAME,
|
||||
with_feature_flags,
|
||||
)
|
||||
from tests.integration_tests.constants import (
|
||||
ADMIN_USERNAME,
|
||||
ALPHA_USERNAME,
|
||||
|
||||
@@ -27,13 +27,20 @@ import pytest
|
||||
from superset import app, db
|
||||
from superset.commands.dataset.exceptions import DatasetNotFoundError
|
||||
from superset.common.utils.query_cache_manager import QueryCacheManager
|
||||
from superset.connectors.sqla.models import SqlaTable, SqlMetric, TableColumn # noqa: F401
|
||||
from superset.connectors.sqla.models import ( # noqa: F401
|
||||
SqlaTable,
|
||||
SqlMetric,
|
||||
TableColumn,
|
||||
)
|
||||
from superset.constants import CacheRegion
|
||||
from superset.daos.exceptions import DatasourceNotFound, DatasourceTypeNotSupportedError
|
||||
from superset.exceptions import SupersetGenericDBErrorException
|
||||
from superset.models.core import Database
|
||||
from superset.utils.core import backend, get_example_default_schema # noqa: F401
|
||||
from superset.utils.database import get_example_database, get_main_database # noqa: F401
|
||||
from superset.utils.database import ( # noqa: F401
|
||||
get_example_database,
|
||||
get_main_database,
|
||||
)
|
||||
from tests.integration_tests.base_tests import db_insert_temp_object, SupersetTestCase
|
||||
from tests.integration_tests.constants import ADMIN_USERNAME
|
||||
from tests.integration_tests.fixtures.birth_names_dashboard import (
|
||||
|
||||
@@ -19,8 +19,14 @@ from .birth_names_dashboard import (
|
||||
load_birth_names_dashboard_with_slices, # noqa: F401
|
||||
load_birth_names_dashboard_with_slices_module_scope, # noqa: F401
|
||||
)
|
||||
from .energy_dashboard import load_energy_table_data, load_energy_table_with_slice # noqa: F401
|
||||
from .public_role import public_role_like_gamma, public_role_like_test_role # noqa: F401
|
||||
from .energy_dashboard import ( # noqa: F401
|
||||
load_energy_table_data,
|
||||
load_energy_table_with_slice,
|
||||
)
|
||||
from .public_role import ( # noqa: F401
|
||||
public_role_like_gamma,
|
||||
public_role_like_test_role,
|
||||
)
|
||||
from .unicode_dashboard import (
|
||||
load_unicode_dashboard_with_position, # noqa: F401
|
||||
load_unicode_dashboard_with_slice, # noqa: F401
|
||||
|
||||
@@ -26,7 +26,9 @@ from superset.reports.models import (
|
||||
ReportRecipientType,
|
||||
ReportScheduleType,
|
||||
)
|
||||
from tests.integration_tests.fixtures.tabbed_dashboard import tabbed_dashboard # noqa: F401
|
||||
from tests.integration_tests.fixtures.tabbed_dashboard import (
|
||||
tabbed_dashboard, # noqa: F401
|
||||
)
|
||||
|
||||
DASHBOARD_REPORT_SCHEDULE_DEFAULTS = {
|
||||
"type": ReportScheduleType.REPORT,
|
||||
|
||||
@@ -24,7 +24,9 @@ from superset.commands.dashboard.permalink.create import CreateDashboardPermalin
|
||||
from superset.commands.report.execute import AsyncExecuteReportScheduleCommand
|
||||
from superset.models.dashboard import Dashboard
|
||||
from superset.reports.models import ReportSourceFormat
|
||||
from tests.integration_tests.fixtures.tabbed_dashboard import tabbed_dashboard # noqa: F401
|
||||
from tests.integration_tests.fixtures.tabbed_dashboard import (
|
||||
tabbed_dashboard, # noqa: F401
|
||||
)
|
||||
from tests.integration_tests.reports.utils import create_dashboard_report
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@ from superset.utils.core import DatasourceType
|
||||
from superset.utils.database import get_main_database
|
||||
from tests.integration_tests.base_tests import SupersetTestCase
|
||||
from tests.integration_tests.conftest import with_feature_flags
|
||||
from tests.integration_tests.fixtures.tags import with_tagging_system_feature # noqa: F401
|
||||
from tests.integration_tests.fixtures.tags import (
|
||||
with_tagging_system_feature, # noqa: F401
|
||||
)
|
||||
|
||||
|
||||
class TestTagging(SupersetTestCase):
|
||||
|
||||
@@ -48,7 +48,9 @@ from tests.integration_tests.fixtures.importexport import (
|
||||
dataset_config, # noqa: F401
|
||||
dataset_metadata_config, # noqa: F401
|
||||
)
|
||||
from tests.integration_tests.fixtures.tags import with_tagging_system_feature # noqa: F401
|
||||
from tests.integration_tests.fixtures.tags import (
|
||||
with_tagging_system_feature, # noqa: F401
|
||||
)
|
||||
from tests.integration_tests.fixtures.world_bank_dashboard import (
|
||||
load_world_bank_dashboard_with_slices, # noqa: F401
|
||||
load_world_bank_data, # noqa: F401
|
||||
|
||||
@@ -32,7 +32,9 @@ from tests.integration_tests.fixtures.birth_names_dashboard import (
|
||||
load_birth_names_data, # noqa: F401
|
||||
)
|
||||
from tests.integration_tests.fixtures.query_context import get_query_context
|
||||
from tests.integration_tests.fixtures.tags import with_tagging_system_feature # noqa: F401
|
||||
from tests.integration_tests.fixtures.tags import (
|
||||
with_tagging_system_feature, # noqa: F401
|
||||
)
|
||||
from tests.integration_tests.test_app import app
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
|
||||
from superset.commands.utils import compute_owner_list, populate_owner_list, User
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user