diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 230e5c4..6d27033 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: rev: v0.3.4 hooks: - id: ruff - args: ["--fix", "--show-fixes"] + args: ["--fix", "--show-fixes", "--select", "I"] - repo: https://github.com/psf/black-pre-commit-mirror rev: 24.3.0 hooks: diff --git a/tests/test_adapter.py b/tests/test_adapter.py index 8701b19..28de29b 100644 --- a/tests/test_adapter.py +++ b/tests/test_adapter.py @@ -1,10 +1,11 @@ """ End-to-end tests of the Harmony Regridding service. """ -from os.path import exists, join as path_join +from os.path import exists +from os.path import join as path_join from shutil import rmtree from tempfile import mkdtemp from unittest import TestCase -from unittest.mock import patch, ANY +from unittest.mock import ANY, patch from harmony.message import Message from harmony.util import config @@ -16,8 +17,7 @@ InvalidTargetCRS, InvalidTargetGrid, ) - -from tests.utilities import create_stac, Granule +from tests.utilities import Granule, create_stac class TestAdapter(TestCase): diff --git a/tests/unit/test_adapter.py b/tests/unit/test_adapter.py index e22919f..0b9a244 100644 --- a/tests/unit/test_adapter.py +++ b/tests/unit/test_adapter.py @@ -1,7 +1,7 @@ from unittest import TestCase from harmony.message import Message -from harmony.util import config, HarmonyException +from harmony.util import HarmonyException, config from harmony_regridding_service.adapter import RegriddingServiceAdapter from harmony_regridding_service.exceptions import ( @@ -9,7 +9,7 @@ InvalidTargetCRS, InvalidTargetGrid, ) -from tests.utilities import create_stac, Granule +from tests.utilities import Granule, create_stac class TestAdapter(TestCase): diff --git a/tests/utilities.py b/tests/utilities.py index f4e3cf1..f992283 100644 --- a/tests/utilities.py +++ b/tests/utilities.py @@ -6,7 +6,6 @@ from harmony.util import bbox_to_geometry from pystac import Asset, Catalog, Item - Granule = namedtuple('Granule', ['url', 'media_type', 'roles'])