diff --git a/superset/__init__.py b/superset/__init__.py index cbab58e0d2c90..ec776d6ea4121 100644 --- a/superset/__init__.py +++ b/superset/__init__.py @@ -29,7 +29,6 @@ security_manager, # noqa: F401 talisman, # noqa: F401 ) -from superset.security import SupersetSecurityManager # noqa: F401 # All of the fields located here should be considered legacy. The correct way # to declare "global" dependencies is to define it in extensions.py, diff --git a/superset/commands/chart/importers/v1/__init__.py b/superset/commands/chart/importers/v1/__init__.py index 8ba24035abde4..4b81d40d735d3 100644 --- a/superset/commands/chart/importers/v1/__init__.py +++ b/superset/commands/chart/importers/v1/__init__.py @@ -18,7 +18,6 @@ from typing import Any from marshmallow import Schema -from sqlalchemy.orm import Session # noqa: F401 from superset.charts.schemas import ImportV1ChartSchema from superset.commands.chart.exceptions import ChartImportError diff --git a/superset/commands/dashboard/importers/v1/__init__.py b/superset/commands/dashboard/importers/v1/__init__.py index 17fb85fcfe6e4..04a991a1a2c48 100644 --- a/superset/commands/dashboard/importers/v1/__init__.py +++ b/superset/commands/dashboard/importers/v1/__init__.py @@ -18,7 +18,6 @@ from typing import Any from marshmallow import Schema -from sqlalchemy.orm import Session # noqa: F401 from sqlalchemy.sql import select from superset import db diff --git a/superset/commands/database/importers/v1/__init__.py b/superset/commands/database/importers/v1/__init__.py index c8684bc5eb428..31a7e3831a02c 100644 --- a/superset/commands/database/importers/v1/__init__.py +++ b/superset/commands/database/importers/v1/__init__.py @@ -18,7 +18,6 @@ from typing import Any from marshmallow import Schema -from sqlalchemy.orm import Session # noqa: F401 from superset.commands.database.exceptions import DatabaseImportError from superset.commands.database.importers.v1.utils import import_database diff --git a/superset/commands/dataset/importers/v1/__init__.py b/superset/commands/dataset/importers/v1/__init__.py index c7ecba122725d..dd2ed503dfa55 100644 --- a/superset/commands/dataset/importers/v1/__init__.py +++ b/superset/commands/dataset/importers/v1/__init__.py @@ -18,7 +18,6 @@ from typing import Any from marshmallow import Schema -from sqlalchemy.orm import Session # noqa: F401 from superset.commands.database.importers.v1.utils import import_database from superset.commands.dataset.exceptions import DatasetImportError diff --git a/superset/commands/importers/v1/__init__.py b/superset/commands/importers/v1/__init__.py index 989c494b60f3a..1f4cb3f1adb56 100644 --- a/superset/commands/importers/v1/__init__.py +++ b/superset/commands/importers/v1/__init__.py @@ -18,7 +18,6 @@ from marshmallow import Schema, validate # noqa: F401 from marshmallow.exceptions import ValidationError -from sqlalchemy.orm import Session # noqa: F401 from superset import db from superset.commands.base import BaseCommand @@ -31,7 +30,6 @@ validate_metadata_type, ) from superset.daos.base import BaseDAO -from superset.models.core import Database # noqa: F401 from superset.utils.decorators import transaction diff --git a/superset/commands/query/importers/v1/__init__.py b/superset/commands/query/importers/v1/__init__.py index 3dc25d93a194d..b50ef53db6073 100644 --- a/superset/commands/query/importers/v1/__init__.py +++ b/superset/commands/query/importers/v1/__init__.py @@ -18,13 +18,11 @@ from typing import Any from marshmallow import Schema -from sqlalchemy.orm import Session # noqa: F401 from superset.commands.database.importers.v1.utils import import_database from superset.commands.importers.v1 import ImportModelsCommand from superset.commands.query.exceptions import SavedQueryImportError from superset.commands.query.importers.v1.utils import import_saved_query -from superset.connectors.sqla.models import SqlaTable # noqa: F401 from superset.daos.query import SavedQueryDAO from superset.databases.schemas import ImportV1DatabaseSchema from superset.queries.saved_queries.schemas import ImportV1SavedQuerySchema diff --git a/superset/initialization/__init__.py b/superset/initialization/__init__.py index 1a09d8b24c7d9..97a20857ad532 100644 --- a/superset/initialization/__init__.py +++ b/superset/initialization/__init__.py @@ -53,7 +53,7 @@ stats_logger_manager, talisman, ) -from superset.security import SupersetSecurityManager +from superset.security.manager import SupersetSecurityManager from superset.sql.parse import SQLGLOT_DIALECTS from superset.superset_typing import FlaskResponse from superset.tags.core import register_sqla_event_listeners diff --git a/superset/reports/notifications/__init__.py b/superset/reports/notifications/__init__.py index 938e3934475c9..d804070a27dba 100644 --- a/superset/reports/notifications/__init__.py +++ b/superset/reports/notifications/__init__.py @@ -16,9 +16,6 @@ # under the License. from superset.reports.models import ReportRecipients from superset.reports.notifications.base import BaseNotification, NotificationContent -from superset.reports.notifications.email import EmailNotification # noqa: F401 -from superset.reports.notifications.slack import SlackNotification # noqa: F401 -from superset.reports.notifications.slackv2 import SlackV2Notification # noqa: F401 def create_notification( diff --git a/superset/security/__init__.py b/superset/security/__init__.py index 42f1a0c560dd2..13a83393a9124 100644 --- a/superset/security/__init__.py +++ b/superset/security/__init__.py @@ -14,4 +14,3 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -from superset.security.manager import SupersetSecurityManager # noqa: F401 diff --git a/superset/sql_validators/__init__.py b/superset/sql_validators/__init__.py index 0298cf32edbe4..8a8cf45aae448 100644 --- a/superset/sql_validators/__init__.py +++ b/superset/sql_validators/__init__.py @@ -17,7 +17,6 @@ from typing import Optional from . import base, postgres, presto_db -from .base import SQLValidationAnnotation # noqa: F401 def get_validator_by_name(name: str) -> Optional[type[base.BaseSQLValidator]]: diff --git a/tests/integration_tests/access_tests.py b/tests/integration_tests/access_tests.py index 2b439e8873e28..32fe274ba56b8 100644 --- a/tests/integration_tests/access_tests.py +++ b/tests/integration_tests/access_tests.py @@ -23,7 +23,6 @@ import pytest from flask.ctx import AppContext from pytest_mock import MockerFixture -from sqlalchemy import inspect # noqa: F401 from tests.integration_tests.fixtures.birth_names_dashboard import ( load_birth_names_dashboard_with_slices, # noqa: F401 @@ -38,10 +37,8 @@ load_energy_table_data, # noqa: F401 ) from superset import security_manager -from superset.connectors.sqla.models import SqlaTable # noqa: F401 from superset.models import core as models # noqa: F401 from superset.utils.core import get_user_id, get_username, override_user -from superset.utils.database import get_example_database # noqa: F401 ROLE_TABLES_PERM_DATA = { diff --git a/tests/integration_tests/advanced_data_type/api_tests.py b/tests/integration_tests/advanced_data_type/api_tests.py index 1a1f74455e02c..ff1b6fda3efae 100644 --- a/tests/integration_tests/advanced_data_type/api_tests.py +++ b/tests/integration_tests/advanced_data_type/api_tests.py @@ -18,10 +18,6 @@ """Unit tests for Superset""" import prison - -from superset.utils.core import get_example_default_schema # noqa: F401 - -from tests.integration_tests.utils.get_dashboards import get_dashboards_ids # noqa: F401 from unittest import mock from sqlalchemy import Column from typing import Any diff --git a/tests/integration_tests/charts/commands_tests.py b/tests/integration_tests/charts/commands_tests.py index 3a193b40e21dc..5041b9a7fa967 100644 --- a/tests/integration_tests/charts/commands_tests.py +++ b/tests/integration_tests/charts/commands_tests.py @@ -18,7 +18,6 @@ import pytest import yaml -from flask import g # noqa: F401 from superset import db, security_manager from superset.commands.chart.create import CreateChartCommand diff --git a/tests/integration_tests/css_templates/api_tests.py b/tests/integration_tests/css_templates/api_tests.py index 0e8054b07a40d..646c887336c3e 100644 --- a/tests/integration_tests/css_templates/api_tests.py +++ b/tests/integration_tests/css_templates/api_tests.py @@ -26,7 +26,6 @@ import tests.integration_tests.test_app # noqa: F401 from superset import db from superset.models.core import CssTemplate -from superset.utils.database import get_example_database # noqa: F401 from superset.utils import json from tests.integration_tests.base_tests import SupersetTestCase diff --git a/tests/integration_tests/dashboard_utils.py b/tests/integration_tests/dashboard_utils.py index 1b900ecbcc8a2..78a99d1464ecc 100644 --- a/tests/integration_tests/dashboard_utils.py +++ b/tests/integration_tests/dashboard_utils.py @@ -18,8 +18,6 @@ from typing import Optional -from pandas import DataFrame # noqa: F401 - from superset import db from superset.connectors.sqla.models import SqlaTable from superset.models.core import Database diff --git a/tests/integration_tests/dashboards/filter_state/api_tests.py b/tests/integration_tests/dashboards/filter_state/api_tests.py index b050a326d5ee4..1b3a353d3aa66 100644 --- a/tests/integration_tests/dashboards/filter_state/api_tests.py +++ b/tests/integration_tests/dashboards/filter_state/api_tests.py @@ -14,12 +14,10 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -from unittest.mock import patch # noqa: F401 import pytest from flask.ctx import AppContext 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 ( @@ -34,7 +32,6 @@ load_world_bank_dashboard_with_slices, # noqa: F401 load_world_bank_data, # noqa: F401 ) -from tests.integration_tests.test_app import app # noqa: F401 KEY = "test-key" INITIAL_VALUE = json.dumps({"test": "initial value"}) diff --git a/tests/integration_tests/dashboards/permalink/api_tests.py b/tests/integration_tests/dashboards/permalink/api_tests.py index 8e0dcaaa420d6..6590c0eaede59 100644 --- a/tests/integration_tests/dashboards/permalink/api_tests.py +++ b/tests/integration_tests/dashboards/permalink/api_tests.py @@ -20,7 +20,6 @@ import pytest 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 ( @@ -34,7 +33,6 @@ load_world_bank_dashboard_with_slices, # noqa: F401 load_world_bank_data, # noqa: F401 ) -from tests.integration_tests.test_app import app # noqa: F401 STATE = { "dataMask": {"FILTER_1": "foo"}, diff --git a/tests/integration_tests/dashboards/security/security_dataset_tests.py b/tests/integration_tests/dashboards/security/security_dataset_tests.py index 064139ccb23de..76656f9ad6375 100644 --- a/tests/integration_tests/dashboards/security/security_dataset_tests.py +++ b/tests/integration_tests/dashboards/security/security_dataset_tests.py @@ -18,7 +18,6 @@ import prison import pytest -from flask import escape # noqa: F401 from superset import app from superset.daos.dashboard import DashboardDAO diff --git a/tests/integration_tests/dashboards/security/security_rbac_tests.py b/tests/integration_tests/dashboards/security/security_rbac_tests.py index 4754854047f15..bc8693937a30c 100644 --- a/tests/integration_tests/dashboards/security/security_rbac_tests.py +++ b/tests/integration_tests/dashboards/security/security_rbac_tests.py @@ -17,7 +17,6 @@ """Unit tests for Superset""" from unittest import mock -from unittest.mock import patch # noqa: F401 import pytest diff --git a/tests/integration_tests/databases/commands_tests.py b/tests/integration_tests/databases/commands_tests.py index 4efe2dcbdc999..ceb74e0e6fa24 100644 --- a/tests/integration_tests/databases/commands_tests.py +++ b/tests/integration_tests/databases/commands_tests.py @@ -39,7 +39,6 @@ from superset.commands.exceptions import CommandInvalidError from superset.commands.importers.exceptions import IncorrectVersionError from superset.connectors.sqla.models import SqlaTable -from superset.databases.schemas import DatabaseTestConnectionSchema # noqa: F401 from superset.databases.ssh_tunnel.models import SSHTunnel from superset.errors import ErrorLevel, SupersetError, SupersetErrorType from superset.exceptions import ( diff --git a/tests/integration_tests/datasets/api_tests.py b/tests/integration_tests/datasets/api_tests.py index 6c6410feed4fa..d8c6f93280fec 100644 --- a/tests/integration_tests/datasets/api_tests.py +++ b/tests/integration_tests/datasets/api_tests.py @@ -30,7 +30,6 @@ from sqlalchemy.orm import joinedload from sqlalchemy.sql import func -from superset import app # noqa: F401 from superset.commands.dataset.exceptions import DatasetCreateFailedError from superset.connectors.sqla.models import SqlaTable, SqlMetric, TableColumn from superset.extensions import db, security_manager diff --git a/tests/integration_tests/db_engine_specs/base_tests.py b/tests/integration_tests/db_engine_specs/base_tests.py index c836e71b689be..08847ccb10456 100644 --- a/tests/integration_tests/db_engine_specs/base_tests.py +++ b/tests/integration_tests/db_engine_specs/base_tests.py @@ -15,8 +15,6 @@ # specific language governing permissions and limitations # under the License. # isort:skip_file - -from tests.integration_tests.test_app import app # noqa: F401 from tests.integration_tests.base_tests import SupersetTestCase from superset.db_engine_specs.base import BaseEngineSpec from superset.models.core import Database diff --git a/tests/integration_tests/db_engine_specs/presto_tests.py b/tests/integration_tests/db_engine_specs/presto_tests.py index c57bec88008d0..d543ce14ae5df 100644 --- a/tests/integration_tests/db_engine_specs/presto_tests.py +++ b/tests/integration_tests/db_engine_specs/presto_tests.py @@ -20,7 +20,6 @@ import pandas as pd from flask.ctx import AppContext -from sqlalchemy import types # noqa: F401 from sqlalchemy.sql import select from superset.db_engine_specs.presto import PrestoEngineSpec diff --git a/tests/integration_tests/event_logger_tests.py b/tests/integration_tests/event_logger_tests.py index 4a9ca8dde6482..4dcb64603460d 100644 --- a/tests/integration_tests/event_logger_tests.py +++ b/tests/integration_tests/event_logger_tests.py @@ -21,7 +21,6 @@ from typing import Any, Optional from unittest.mock import patch -from flask import current_app # noqa: F401 from freezegun import freeze_time from superset import security_manager diff --git a/tests/integration_tests/explore/api_tests.py b/tests/integration_tests/explore/api_tests.py index 730e013f82718..f69216317d4bd 100644 --- a/tests/integration_tests/explore/api_tests.py +++ b/tests/integration_tests/explore/api_tests.py @@ -18,7 +18,6 @@ import pytest from flask_appbuilder.security.sqla.models import User -from sqlalchemy.orm import Session # noqa: F401 from superset import db from superset.commands.explore.form_data.state import TemporaryExploreState diff --git a/tests/integration_tests/explore/form_data/api_tests.py b/tests/integration_tests/explore/form_data/api_tests.py index 6057bb271f9b8..b5e76803412d4 100644 --- a/tests/integration_tests/explore/form_data/api_tests.py +++ b/tests/integration_tests/explore/form_data/api_tests.py @@ -18,7 +18,6 @@ import pytest from flask_appbuilder.security.sqla.models import User -from sqlalchemy.orm import Session # noqa: F401 from superset import db from superset.commands.dataset.exceptions import DatasetAccessDeniedError diff --git a/tests/integration_tests/explore/permalink/api_tests.py b/tests/integration_tests/explore/permalink/api_tests.py index a2410306121fa..efd9c6aac120a 100644 --- a/tests/integration_tests/explore/permalink/api_tests.py +++ b/tests/integration_tests/explore/permalink/api_tests.py @@ -19,7 +19,6 @@ from uuid import uuid3 import pytest -from sqlalchemy.orm import Session # noqa: F401 from superset import db from superset.explore.permalink.schemas import ExplorePermalinkSchema @@ -33,7 +32,6 @@ load_world_bank_dashboard_with_slices, # noqa: F401 load_world_bank_data, # noqa: F401 ) -from tests.integration_tests.test_app import app # noqa: F401 @pytest.fixture diff --git a/tests/integration_tests/fixtures/datasource.py b/tests/integration_tests/fixtures/datasource.py index 99223b9c1a2b8..aa5aa7aa0ab3b 100644 --- a/tests/integration_tests/fixtures/datasource.py +++ b/tests/integration_tests/fixtures/datasource.py @@ -27,7 +27,6 @@ from superset.extensions import db from superset.models.core import Database from superset.utils.core import get_example_default_schema -from superset.utils.database import get_example_database # noqa: F401 from tests.integration_tests.test_app import app diff --git a/tests/integration_tests/log_api_tests.py b/tests/integration_tests/log_api_tests.py index 0ed588d50be86..ec5449c2457cf 100644 --- a/tests/integration_tests/log_api_tests.py +++ b/tests/integration_tests/log_api_tests.py @@ -30,14 +30,12 @@ from superset.views.log.api import LogRestApi from superset.utils import json from tests.integration_tests.base_tests import SupersetTestCase -from tests.integration_tests.conftest import with_feature_flags # noqa: F401 from tests.integration_tests.constants import ( ADMIN_USERNAME, ALPHA_USERNAME, GAMMA_USERNAME, ) from tests.integration_tests.dashboard_utils import create_dashboard -from tests.integration_tests.test_app import app # noqa: F401 EXPECTED_COLUMNS = [ "action", diff --git a/tests/integration_tests/model_tests.py b/tests/integration_tests/model_tests.py index f3d73ae5534c4..5f9b7faa66413 100644 --- a/tests/integration_tests/model_tests.py +++ b/tests/integration_tests/model_tests.py @@ -22,7 +22,6 @@ from unittest import mock from superset import security_manager -from superset.connectors.sqla.models import SqlaTable # noqa: F401 from superset.exceptions import SupersetException from superset.utils.core import override_user from tests.integration_tests.fixtures.birth_names_dashboard import ( @@ -32,11 +31,9 @@ import pytest from sqlalchemy.engine.url import make_url -from sqlalchemy.types import DateTime # noqa: F401 import tests.integration_tests.test_app # noqa: F401 from superset import app, db as metadata_db -from superset.db_engine_specs.postgres import PostgresEngineSpec # noqa: F401 from superset.common.db_query_status import QueryStatus from superset.models.core import Database from superset.models.slice import Slice diff --git a/tests/integration_tests/reports/commands_tests.py b/tests/integration_tests/reports/commands_tests.py index 7b22b38fc0cfc..43f4d46ad0498 100644 --- a/tests/integration_tests/reports/commands_tests.py +++ b/tests/integration_tests/reports/commands_tests.py @@ -1756,7 +1756,6 @@ def test_email_dashboard_report_fails_uncaught_exception( and logs with uncaught exception """ # setup screenshot mock - from smtplib import SMTPException # noqa: F401 screenshot_mock.return_value = SCREENSHOT_FILE email_mock.side_effect = Exception("Uncaught exception") @@ -2045,9 +2044,6 @@ def test_fail_screenshot(screenshot_mock, email_mock, create_report_email_chart) """ ExecuteReport Command: Test soft timeout on screenshot """ - from celery.exceptions import SoftTimeLimitExceeded # noqa: F401 - - from superset.commands.report.exceptions import AlertQueryTimeout # noqa: F401 screenshot_mock.side_effect = Exception("Unexpected error") with pytest.raises(ReportScheduleScreenshotFailedError): diff --git a/tests/integration_tests/reports/utils.py b/tests/integration_tests/reports/utils.py index 3ab5c46c4eb1e..b2cc3c13763c8 100644 --- a/tests/integration_tests/reports/utils.py +++ b/tests/integration_tests/reports/utils.py @@ -37,7 +37,6 @@ ) from superset.utils import json from superset.utils.core import override_user -from tests.integration_tests.test_app import app # noqa: F401 from tests.integration_tests.utils import read_fixture TEST_ID = str(uuid4()) diff --git a/tests/integration_tests/security/guest_token_security_tests.py b/tests/integration_tests/security/guest_token_security_tests.py index 36c2c927377f3..edc1e0a649fba 100644 --- a/tests/integration_tests/security/guest_token_security_tests.py +++ b/tests/integration_tests/security/guest_token_security_tests.py @@ -26,8 +26,7 @@ from superset.daos.dashboard import EmbeddedDashboardDAO from superset.exceptions import SupersetSecurityException from superset.models.dashboard import Dashboard -from superset.security.guest_token import GuestTokenResourceType # noqa: F401 -from superset.sql_parse import Table # noqa: F401 +from superset.security.guest_token import GuestTokenResourceType from superset.utils import json from superset.utils.core import get_example_default_schema from superset.utils.database import get_example_database diff --git a/tests/integration_tests/security/migrate_roles_tests.py b/tests/integration_tests/security/migrate_roles_tests.py index 738bb6b60a1ed..bf47d1965a6dc 100644 --- a/tests/integration_tests/security/migrate_roles_tests.py +++ b/tests/integration_tests/security/migrate_roles_tests.py @@ -18,7 +18,6 @@ import logging from contextlib import contextmanager -from unittest.mock import patch # noqa: F401 import pytest from flask_appbuilder.security.sqla.models import Role diff --git a/tests/integration_tests/security/row_level_security_tests.py b/tests/integration_tests/security/row_level_security_tests.py index 0916124a6f195..b31c4fa136732 100644 --- a/tests/integration_tests/security/row_level_security_tests.py +++ b/tests/integration_tests/security/row_level_security_tests.py @@ -33,7 +33,6 @@ from flask_babel import lazy_gettext as _ # noqa: F401 from flask_appbuilder.models.sqla import filters from tests.integration_tests.base_tests import SupersetTestCase -from tests.integration_tests.conftest import with_config # noqa: F401 from tests.integration_tests.constants import ADMIN_USERNAME from tests.integration_tests.fixtures.birth_names_dashboard import ( load_birth_names_dashboard_with_slices, # noqa: F401 diff --git a/tests/integration_tests/security_tests.py b/tests/integration_tests/security_tests.py index f148f9418e839..b87735e6b4832 100644 --- a/tests/integration_tests/security_tests.py +++ b/tests/integration_tests/security_tests.py @@ -29,7 +29,6 @@ from flask import current_app, g from flask_appbuilder.security.sqla.models import Role -from superset.daos.datasource import DatasourceDAO # noqa: F401 from superset.models.dashboard import Dashboard from superset import app, appbuilder, db, security_manager, viz from superset.connectors.sqla.models import SqlaTable diff --git a/tests/integration_tests/sql_lab/api_tests.py b/tests/integration_tests/sql_lab/api_tests.py index 7d0ea7cc2efa5..182f9c6d2d649 100644 --- a/tests/integration_tests/sql_lab/api_tests.py +++ b/tests/integration_tests/sql_lab/api_tests.py @@ -25,14 +25,12 @@ import pytest import prison -from sqlalchemy.sql import func # noqa: F401 from unittest import mock from flask_appbuilder.security.sqla.models import Role from tests.integration_tests.test_app import app from superset import db, sql_lab from superset.common.db_query_status import QueryStatus -from superset.models.core import Database # noqa: F401 from superset.utils.database import get_example_database, get_main_database # noqa: F401 from superset.utils import core as utils, json from superset.models.sql_lab import Query @@ -42,8 +40,6 @@ ADMIN_USERNAME, GAMMA_SQLLAB_NO_DATA_USERNAME, ) -from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_data # noqa: F401 -from tests.integration_tests.fixtures.users import create_gamma_sqllab_no_data # noqa: F401 QUERIES_FIXTURE_COUNT = 10 diff --git a/tests/integration_tests/sql_lab/commands_tests.py b/tests/integration_tests/sql_lab/commands_tests.py index acd9edbf21ee7..318826d65dec9 100644 --- a/tests/integration_tests/sql_lab/commands_tests.py +++ b/tests/integration_tests/sql_lab/commands_tests.py @@ -31,7 +31,6 @@ SupersetSecurityException, SupersetTimeoutException, ) -from superset.models.core import Database # noqa: F401 from superset.models.sql_lab import Query from superset.sqllab.limiting_factor import LimitingFactor from superset.sqllab.schemas import EstimateQueryCostSchema diff --git a/tests/integration_tests/sqllab_tests.py b/tests/integration_tests/sqllab_tests.py index 65d0c5fd3bd29..fcdbc1fc2bd3c 100644 --- a/tests/integration_tests/sqllab_tests.py +++ b/tests/integration_tests/sqllab_tests.py @@ -26,7 +26,6 @@ import prison from superset import db, security_manager -from superset.connectors.sqla.models import SqlaTable # noqa: F401 from superset.db_engine_specs import BaseEngineSpec from superset.db_engine_specs.hive import HiveEngineSpec from superset.db_engine_specs.presto import PrestoEngineSpec @@ -43,7 +42,6 @@ from superset.sql_parse import CtasMethod from superset.utils.core import backend from superset.utils import json -from superset.utils.json import datetime_to_epoch # noqa: F401 from superset.utils.database import get_example_database, get_main_database from tests.integration_tests.base_tests import SupersetTestCase diff --git a/tests/integration_tests/strategy_tests.py b/tests/integration_tests/strategy_tests.py index 6dc99f501fee6..6430216974283 100644 --- a/tests/integration_tests/strategy_tests.py +++ b/tests/integration_tests/strategy_tests.py @@ -17,7 +17,6 @@ # isort:skip_file """Unit tests for Superset cache warmup""" -from unittest.mock import MagicMock # noqa: F401 from tests.integration_tests.fixtures.birth_names_dashboard import ( load_birth_names_dashboard_with_slices, # noqa: F401 load_birth_names_data, # noqa: F401 @@ -28,9 +27,6 @@ import pytest import pandas as pd # noqa: F401 -from superset.models.slice import Slice # noqa: F401 -from superset.utils.database import get_example_database # noqa: F401 - from superset import db from superset.models.core import Log @@ -39,7 +35,6 @@ DashboardTagsStrategy, TopNDashboardsStrategy, ) -from superset.utils.urls import get_url_host # noqa: F401 from tests.integration_tests.base_tests import SupersetTestCase from tests.integration_tests.constants import ADMIN_USERNAME diff --git a/tests/integration_tests/tags/api_tests.py b/tests/integration_tests/tags/api_tests.py index 79022d2805eb0..fe09ac8063d95 100644 --- a/tests/integration_tests/tags/api_tests.py +++ b/tests/integration_tests/tags/api_tests.py @@ -19,25 +19,18 @@ import prison from datetime import datetime - -from flask import g # noqa: F401 import pytest import prison # noqa: F811 from freezegun import freeze_time from sqlalchemy.sql import func -from sqlalchemy import and_ # noqa: F401 from superset.models.dashboard import Dashboard from superset.models.slice import Slice -from superset.models.sql_lab import SavedQuery # noqa: F401 -from superset.tags.models import user_favorite_tag_table # noqa: F401 from unittest.mock import patch from urllib import parse import tests.integration_tests.test_app # noqa: F401 from superset import db, security_manager # noqa: F401 -from superset.common.db_query_status import QueryStatus # noqa: F401 -from superset.models.core import Database # noqa: F401 from superset.utils.database import get_example_database, get_main_database # noqa: F401 from superset.utils import json from superset.tags.models import ObjectType, Tag, TagType, TaggedObject @@ -50,10 +43,10 @@ load_world_bank_dashboard_with_slices, # noqa: F401 load_world_bank_data, # noqa: F401 ) -from tests.integration_tests.fixtures.tags import with_tagging_system_feature # noqa: F401 from tests.integration_tests.base_tests import SupersetTestCase from superset.daos.tag import TagDAO from superset.tags.models import ObjectType # noqa: F811 +from tests.integration_tests.fixtures.tags import with_tagging_system_feature # noqa: F401 TAGS_FIXTURE_COUNT = 10 diff --git a/tests/integration_tests/tags/commands_tests.py b/tests/integration_tests/tags/commands_tests.py index cf340c5b110f2..0583120d5c71c 100644 --- a/tests/integration_tests/tags/commands_tests.py +++ b/tests/integration_tests/tags/commands_tests.py @@ -19,24 +19,17 @@ import pytest import yaml # noqa: F401 -from werkzeug.utils import secure_filename # noqa: F401 from superset import db, security_manager # noqa: F401 -from superset.commands.dashboard.exceptions import DashboardNotFoundError # noqa: F401 from superset.commands.dashboard.export import ( append_charts, # noqa: F401 ExportDashboardsCommand, # noqa: F401 get_default_position, # noqa: F401 ) from superset.commands.dashboard.importers import v0, v1 # noqa: F401 -from superset.commands.exceptions import CommandInvalidError # noqa: F401 -from superset.commands.importers.exceptions import IncorrectVersionError # noqa: F401 from superset.commands.tag.create import CreateCustomTagCommand from superset.commands.tag.delete import DeleteTaggedObjectCommand, DeleteTagsCommand -from superset.connectors.sqla.models import SqlaTable # noqa: F401 -from superset.models.core import Database # noqa: F401 from superset.models.dashboard import Dashboard -from superset.models.slice import Slice # noqa: F401 from superset.tags.models import ObjectType, Tag, TaggedObject, TagType from tests.integration_tests.base_tests import SupersetTestCase from tests.integration_tests.fixtures.importexport import ( diff --git a/tests/integration_tests/tags/dao_tests.py b/tests/integration_tests/tags/dao_tests.py index 16e09f414945e..f86599dba11a4 100644 --- a/tests/integration_tests/tags/dao_tests.py +++ b/tests/integration_tests/tags/dao_tests.py @@ -16,18 +16,14 @@ # under the License. # isort:skip_file from operator import and_ -from unittest.mock import patch # noqa: F401 import pytest from superset.models.slice import Slice -from superset.models.sql_lab import SavedQuery # noqa: F401 from superset.daos.tag import TagDAO -from superset.tags.exceptions import InvalidTagNameError # noqa: F401 from superset.tags.models import ObjectType, Tag, TaggedObject from tests.integration_tests.tags.api_tests import TAGS_FIXTURE_COUNT import tests.integration_tests.test_app # pylint: disable=unused-import # noqa: F401 from superset import db, security_manager # noqa: F401 -from superset.daos.dashboard import DashboardDAO # noqa: F401 from superset.models.dashboard import Dashboard from tests.integration_tests.base_tests import SupersetTestCase from tests.integration_tests.fixtures.world_bank_dashboard import ( diff --git a/tests/integration_tests/utils_tests.py b/tests/integration_tests/utils_tests.py index ca49d65fc09db..63664ed213196 100644 --- a/tests/integration_tests/utils_tests.py +++ b/tests/integration_tests/utils_tests.py @@ -34,15 +34,12 @@ import pytest from flask import Flask, g # noqa: F401 import marshmallow -from sqlalchemy.exc import ArgumentError # noqa: F401 import tests.integration_tests.test_app # noqa: F401 from superset import app, db, security_manager from superset.constants import NO_TIME_RANGE from superset.exceptions import CertificateException, SupersetException # noqa: F401 from superset.models.core import Database, Log -from superset.models.dashboard import Dashboard # noqa: F401 -from superset.models.slice import Slice # noqa: F401 from superset.utils.core import ( cast_to_num, convert_legacy_filters_into_adhoc, diff --git a/tests/unit_tests/db_engine_specs/test_bigquery.py b/tests/unit_tests/db_engine_specs/test_bigquery.py index c28ff0e46b49a..f921d8ae9c09f 100644 --- a/tests/unit_tests/db_engine_specs/test_bigquery.py +++ b/tests/unit_tests/db_engine_specs/test_bigquery.py @@ -31,7 +31,6 @@ from superset.superset_typing import ResultSetColumnType from superset.utils import json from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 def test_get_fields() -> None: diff --git a/tests/unit_tests/db_engine_specs/test_clickhouse.py b/tests/unit_tests/db_engine_specs/test_clickhouse.py index c4277ce4ed6bf..eaae1b236a773 100644 --- a/tests/unit_tests/db_engine_specs/test_clickhouse.py +++ b/tests/unit_tests/db_engine_specs/test_clickhouse.py @@ -38,7 +38,6 @@ assert_column_spec, assert_convert_dttm, ) -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_couchbase.py b/tests/unit_tests/db_engine_specs/test_couchbase.py index dcc3c386da5cb..35880f0b644a2 100644 --- a/tests/unit_tests/db_engine_specs/test_couchbase.py +++ b/tests/unit_tests/db_engine_specs/test_couchbase.py @@ -26,7 +26,6 @@ assert_column_spec, assert_convert_dttm, ) -from tests.unit_tests.fixtures.common import dttm # noqa: F401 def test_epoch_to_dttm() -> None: diff --git a/tests/unit_tests/db_engine_specs/test_crate.py b/tests/unit_tests/db_engine_specs/test_crate.py index ba36dda1b689b..c29f435bb6a49 100644 --- a/tests/unit_tests/db_engine_specs/test_crate.py +++ b/tests/unit_tests/db_engine_specs/test_crate.py @@ -20,7 +20,6 @@ import pytest from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 def test_epoch_to_dttm() -> None: diff --git a/tests/unit_tests/db_engine_specs/test_crdb.py b/tests/unit_tests/db_engine_specs/test_crdb.py index 1ee6613008e57..57e1a6d4246ef 100644 --- a/tests/unit_tests/db_engine_specs/test_crdb.py +++ b/tests/unit_tests/db_engine_specs/test_crdb.py @@ -21,7 +21,6 @@ import pytest from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_databend.py b/tests/unit_tests/db_engine_specs/test_databend.py index b1c25bbbe9a8a..edba8ec6cec07 100644 --- a/tests/unit_tests/db_engine_specs/test_databend.py +++ b/tests/unit_tests/db_engine_specs/test_databend.py @@ -37,7 +37,6 @@ assert_column_spec, assert_convert_dttm, ) -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_databricks.py b/tests/unit_tests/db_engine_specs/test_databricks.py index 95403780e11b4..552fdb19774f6 100644 --- a/tests/unit_tests/db_engine_specs/test_databricks.py +++ b/tests/unit_tests/db_engine_specs/test_databricks.py @@ -26,7 +26,6 @@ from superset.errors import ErrorLevel, SupersetError, SupersetErrorType from superset.utils import json from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 def test_get_parameters_from_uri() -> None: diff --git a/tests/unit_tests/db_engine_specs/test_denodo.py b/tests/unit_tests/db_engine_specs/test_denodo.py index 9da7874ef0c4f..8c43553b97a14 100644 --- a/tests/unit_tests/db_engine_specs/test_denodo.py +++ b/tests/unit_tests/db_engine_specs/test_denodo.py @@ -28,7 +28,6 @@ assert_column_spec, assert_convert_dttm, ) -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_dremio.py b/tests/unit_tests/db_engine_specs/test_dremio.py index 88eae76475ca4..867d5b959f589 100644 --- a/tests/unit_tests/db_engine_specs/test_dremio.py +++ b/tests/unit_tests/db_engine_specs/test_dremio.py @@ -21,7 +21,6 @@ from pytest_mock import MockerFixture from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_drill.py b/tests/unit_tests/db_engine_specs/test_drill.py index eb3414ea5bb0e..aad25c5263428 100644 --- a/tests/unit_tests/db_engine_specs/test_drill.py +++ b/tests/unit_tests/db_engine_specs/test_drill.py @@ -23,7 +23,6 @@ from sqlalchemy.engine.url import make_url from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 def test_odbc_impersonation() -> None: diff --git a/tests/unit_tests/db_engine_specs/test_druid.py b/tests/unit_tests/db_engine_specs/test_druid.py index 4d6f84e1ee65c..8d44580bb4243 100644 --- a/tests/unit_tests/db_engine_specs/test_druid.py +++ b/tests/unit_tests/db_engine_specs/test_druid.py @@ -22,7 +22,6 @@ from sqlalchemy import column from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_duckdb.py b/tests/unit_tests/db_engine_specs/test_duckdb.py index 9bbd38e5d593b..a2d103433fb98 100644 --- a/tests/unit_tests/db_engine_specs/test_duckdb.py +++ b/tests/unit_tests/db_engine_specs/test_duckdb.py @@ -24,7 +24,6 @@ from superset.config import VERSION_STRING from superset.utils import json from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_dynamodb.py b/tests/unit_tests/db_engine_specs/test_dynamodb.py index 71b98fd4c8426..5ef9b5776c90a 100644 --- a/tests/unit_tests/db_engine_specs/test_dynamodb.py +++ b/tests/unit_tests/db_engine_specs/test_dynamodb.py @@ -21,7 +21,6 @@ import pytest from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_elasticsearch.py b/tests/unit_tests/db_engine_specs/test_elasticsearch.py index 2c003aba53122..17a4b55cd7ceb 100644 --- a/tests/unit_tests/db_engine_specs/test_elasticsearch.py +++ b/tests/unit_tests/db_engine_specs/test_elasticsearch.py @@ -19,10 +19,8 @@ from unittest.mock import MagicMock import pytest -from sqlalchemy import column # noqa: F401 from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_firebird.py b/tests/unit_tests/db_engine_specs/test_firebird.py index 752c26f4556a9..0fb877fec6af1 100644 --- a/tests/unit_tests/db_engine_specs/test_firebird.py +++ b/tests/unit_tests/db_engine_specs/test_firebird.py @@ -21,7 +21,6 @@ import pytest from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_firebolt.py b/tests/unit_tests/db_engine_specs/test_firebolt.py index 5f417d06c52c6..7a2a102d1fa56 100644 --- a/tests/unit_tests/db_engine_specs/test_firebolt.py +++ b/tests/unit_tests/db_engine_specs/test_firebolt.py @@ -22,7 +22,6 @@ import pytest from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_hana.py b/tests/unit_tests/db_engine_specs/test_hana.py index ade424062ba9f..91c8156c6f54c 100644 --- a/tests/unit_tests/db_engine_specs/test_hana.py +++ b/tests/unit_tests/db_engine_specs/test_hana.py @@ -21,7 +21,6 @@ import pytest from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_hive.py b/tests/unit_tests/db_engine_specs/test_hive.py index e534259d2c14a..6f868440d0516 100644 --- a/tests/unit_tests/db_engine_specs/test_hive.py +++ b/tests/unit_tests/db_engine_specs/test_hive.py @@ -23,7 +23,6 @@ from sqlalchemy.engine.url import make_url from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_impala.py b/tests/unit_tests/db_engine_specs/test_impala.py index e85a2ce782189..3ec08d07342dc 100644 --- a/tests/unit_tests/db_engine_specs/test_impala.py +++ b/tests/unit_tests/db_engine_specs/test_impala.py @@ -25,7 +25,6 @@ from superset.models.core import Database from superset.models.sql_lab import Query from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_kusto.py b/tests/unit_tests/db_engine_specs/test_kusto.py index a0593f7e3f942..76cc027e5430a 100644 --- a/tests/unit_tests/db_engine_specs/test_kusto.py +++ b/tests/unit_tests/db_engine_specs/test_kusto.py @@ -23,7 +23,6 @@ from superset.sql.parse import SQLScript from superset.sql_parse import ParsedQuery from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_kylin.py b/tests/unit_tests/db_engine_specs/test_kylin.py index 3392be77d4072..64a692bb9437c 100644 --- a/tests/unit_tests/db_engine_specs/test_kylin.py +++ b/tests/unit_tests/db_engine_specs/test_kylin.py @@ -21,7 +21,6 @@ import pytest from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_mssql.py b/tests/unit_tests/db_engine_specs/test_mssql.py index affd758f09145..b7f00e2ee87f0 100644 --- a/tests/unit_tests/db_engine_specs/test_mssql.py +++ b/tests/unit_tests/db_engine_specs/test_mssql.py @@ -33,7 +33,6 @@ assert_column_spec, assert_convert_dttm, ) -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_mysql.py b/tests/unit_tests/db_engine_specs/test_mysql.py index 649af5c7c1525..049063c85b804 100644 --- a/tests/unit_tests/db_engine_specs/test_mysql.py +++ b/tests/unit_tests/db_engine_specs/test_mysql.py @@ -41,7 +41,6 @@ assert_column_spec, assert_convert_dttm, ) -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_oracle.py b/tests/unit_tests/db_engine_specs/test_oracle.py index 376b29bbf3805..90c49a956612b 100644 --- a/tests/unit_tests/db_engine_specs/test_oracle.py +++ b/tests/unit_tests/db_engine_specs/test_oracle.py @@ -25,7 +25,6 @@ from sqlalchemy.sql import quoted_name from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_parseable.py b/tests/unit_tests/db_engine_specs/test_parseable.py index 4e5a5783042b7..98ffbfd8a4960 100644 --- a/tests/unit_tests/db_engine_specs/test_parseable.py +++ b/tests/unit_tests/db_engine_specs/test_parseable.py @@ -20,7 +20,6 @@ import pytest from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 def test_epoch_to_dttm() -> None: diff --git a/tests/unit_tests/db_engine_specs/test_postgres.py b/tests/unit_tests/db_engine_specs/test_postgres.py index b93d70f5f76f0..97d93c5762ac7 100644 --- a/tests/unit_tests/db_engine_specs/test_postgres.py +++ b/tests/unit_tests/db_engine_specs/test_postgres.py @@ -31,7 +31,6 @@ assert_column_spec, assert_convert_dttm, ) -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_redshift.py b/tests/unit_tests/db_engine_specs/test_redshift.py index 77022809075a9..88fbb05dc7920 100644 --- a/tests/unit_tests/db_engine_specs/test_redshift.py +++ b/tests/unit_tests/db_engine_specs/test_redshift.py @@ -21,7 +21,6 @@ import pytest from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_rockset.py b/tests/unit_tests/db_engine_specs/test_rockset.py index 2d5f23c18005a..91297b509259c 100644 --- a/tests/unit_tests/db_engine_specs/test_rockset.py +++ b/tests/unit_tests/db_engine_specs/test_rockset.py @@ -21,7 +21,6 @@ import pytest from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_snowflake.py b/tests/unit_tests/db_engine_specs/test_snowflake.py index 68c611c5c0b2f..e467740b0a9f1 100644 --- a/tests/unit_tests/db_engine_specs/test_snowflake.py +++ b/tests/unit_tests/db_engine_specs/test_snowflake.py @@ -28,7 +28,6 @@ from superset.errors import ErrorLevel, SupersetError, SupersetErrorType from superset.utils import json from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_sqlite.py b/tests/unit_tests/db_engine_specs/test_sqlite.py index 485ec293a5f46..ebc0f59ca5f74 100644 --- a/tests/unit_tests/db_engine_specs/test_sqlite.py +++ b/tests/unit_tests/db_engine_specs/test_sqlite.py @@ -23,7 +23,6 @@ from superset.constants import TimeGrain from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 @pytest.mark.parametrize( diff --git a/tests/unit_tests/db_engine_specs/test_trino.py b/tests/unit_tests/db_engine_specs/test_trino.py index cbf3bdd5de848..08c3e15c1bbc2 100644 --- a/tests/unit_tests/db_engine_specs/test_trino.py +++ b/tests/unit_tests/db_engine_specs/test_trino.py @@ -57,7 +57,6 @@ assert_column_spec, assert_convert_dttm, ) -from tests.unit_tests.fixtures.common import dttm # noqa: F401 def _assert_columns_equal(actual_cols, expected_cols) -> None: diff --git a/tests/unit_tests/db_engine_specs/test_ydb.py b/tests/unit_tests/db_engine_specs/test_ydb.py index 63538270b6889..3a97a0a85af13 100644 --- a/tests/unit_tests/db_engine_specs/test_ydb.py +++ b/tests/unit_tests/db_engine_specs/test_ydb.py @@ -25,7 +25,6 @@ from superset.utils import json from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm -from tests.unit_tests.fixtures.common import dttm # noqa: F401 def test_epoch_to_dttm() -> None: diff --git a/tests/unit_tests/legacy_tests.py b/tests/unit_tests/legacy_tests.py index 62281b62eb4a9..7654f5c83dd69 100644 --- a/tests/unit_tests/legacy_tests.py +++ b/tests/unit_tests/legacy_tests.py @@ -20,7 +20,6 @@ from typing import Any from superset.legacy import update_time_range -from tests.unit_tests.conftest import with_feature_flags # noqa: F401 original_form_data = { "granularity_sqla": "order_date",