mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
chore: set up ruff as a new linter/formatter (#28158)
This commit is contained in:
committed by
GitHub
parent
e8a678b75a
commit
2d63722150
@@ -16,7 +16,6 @@
|
||||
# under the License.
|
||||
import os
|
||||
import sys
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -32,7 +31,7 @@ scripts_dir = os.path.abspath(
|
||||
)
|
||||
sys.path.append(scripts_dir)
|
||||
|
||||
import build_docker as docker_utils # Replace with the actual function name
|
||||
import build_docker as docker_utils # Replace with the actual function name # noqa: E402
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
||||
@@ -26,7 +26,7 @@ from pytest_mock import MockerFixture
|
||||
from superset.exceptions import CreateKeyValueDistributedLockFailedException
|
||||
from superset.key_value.exceptions import KeyValueCreateFailedError
|
||||
from superset.key_value.types import KeyValueResource
|
||||
from superset.utils.lock import KeyValueDistributedLock, serialize
|
||||
from superset.utils.lock import KeyValueDistributedLock
|
||||
|
||||
|
||||
def test_KeyValueDistributedLock_happy_path(mocker: MockerFixture) -> None:
|
||||
|
||||
@@ -21,7 +21,6 @@ from unittest.mock import MagicMock, patch
|
||||
|
||||
import pandas as pd
|
||||
import pytest
|
||||
from sqlalchemy import CheckConstraint, Column, Integer, MetaData, Table
|
||||
|
||||
from superset.exceptions import SupersetException
|
||||
from superset.utils.core import (
|
||||
@@ -314,7 +313,6 @@ def test_generic_constraint_name_not_found():
|
||||
table_name = "my_table"
|
||||
columns = {"column1", "column2"}
|
||||
referenced_table_name = "other_table"
|
||||
constraint_name = "my_constraint"
|
||||
|
||||
# Create a mock table object with the same structure but no matching constraint
|
||||
table_mock = MagicMock()
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import pytest
|
||||
|
||||
from superset.utils.urls import modify_url_query
|
||||
|
||||
|
||||
Reference in New Issue
Block a user