chore: set up ruff as a new linter/formatter (#28158)

This commit is contained in:
Maxime Beauchemin
2024-04-24 17:19:53 -07:00
committed by GitHub
parent e8a678b75a
commit 2d63722150
579 changed files with 2508 additions and 2542 deletions

View File

@@ -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)

View File

@@ -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:

View File

@@ -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()

View File

@@ -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