diff --git a/src/nwp_consumer/internal/ports/services.py b/src/nwp_consumer/internal/ports/services.py index 5868803..63d2ee6 100644 --- a/src/nwp_consumer/internal/ports/services.py +++ b/src/nwp_consumer/internal/ports/services.py @@ -11,8 +11,6 @@ from returns.result import ResultE -from nwp_consumer.internal import entities - class ConsumeUseCase(abc.ABC): """Interface for the consumer use case. diff --git a/src/nwp_consumer/internal/repositories/raw_repositories/ecmwf_realtime.py b/src/nwp_consumer/internal/repositories/raw_repositories/ecmwf_realtime.py index ed03563..e242038 100644 --- a/src/nwp_consumer/internal/repositories/raw_repositories/ecmwf_realtime.py +++ b/src/nwp_consumer/internal/repositories/raw_repositories/ecmwf_realtime.py @@ -247,9 +247,11 @@ def _convert(path: pathlib.Path) -> ResultE[list[xr.DataArray]]: # ECMWF Realtime provides all regions in one set of datasets, # so distinguish via their coordinates is_relevant_dataset_predicate: bool = ( - (expected_lons is not None and expected_lats is not None) and - (expected_lons[0] <= max(ds.coords["longitude"].values) <= expected_lons[-1]) and - (expected_lats[-1] <= max(ds.coords["latitude"].values) <= expected_lats[0]) + (expected_lons is not None and expected_lats is not None) + and + (expected_lons[0] <= max(ds.coords["longitude"].values) <= expected_lons[-1]) + and + (expected_lats[-1] <= max(ds.coords["latitude"].values) <= expected_lats[0]) ) if not is_relevant_dataset_predicate: continue diff --git a/src/nwp_consumer/internal/repositories/raw_repositories/test_ecmwf_realtime.py b/src/nwp_consumer/internal/repositories/raw_repositories/test_ecmwf_realtime.py index f13a578..725c8a1 100644 --- a/src/nwp_consumer/internal/repositories/raw_repositories/test_ecmwf_realtime.py +++ b/src/nwp_consumer/internal/repositories/raw_repositories/test_ecmwf_realtime.py @@ -3,8 +3,8 @@ import os import pathlib import unittest -from unittest.mock import patch from typing import TYPE_CHECKING +from unittest.mock import patch from returns.result import Failure, ResultE, Success diff --git a/src/nwp_consumer/internal/services/test_consumer_service.py b/src/nwp_consumer/internal/services/test_consumer_service.py index f8562dd..fe3e350 100644 --- a/src/nwp_consumer/internal/services/test_consumer_service.py +++ b/src/nwp_consumer/internal/services/test_consumer_service.py @@ -7,7 +7,7 @@ from nwp_consumer.internal.services.consumer_service import ConsumerService -from ._dummy_adaptors import DummyRawRepository, DummyNotificationRepository +from ._dummy_adaptors import DummyNotificationRepository, DummyRawRepository class TestParallelConsumer(unittest.TestCase):