From 77071a9d4d347ea13ea7604106c073fa9d8d2702 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:02:08 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.4 → v0.6.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.4...v0.6.4) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3e0ed23..2345b80 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ fail_fast: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: 'v0.5.4' + rev: 'v0.6.4' hooks: - id: ruff - repo: https://github.com/pre-commit/pre-commit-hooks From e04ab7bf74df6e48ad2de397aa64148d8e7d8736 Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Mon, 16 Sep 2024 16:24:13 +0200 Subject: [PATCH 2/2] Make ruff happy --- trolldb/tests/conftest.py | 4 ++-- trolldb/tests/test_recorder.py | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/trolldb/tests/conftest.py b/trolldb/tests/conftest.py index 0821d85..ad6fb09 100644 --- a/trolldb/tests/conftest.py +++ b/trolldb/tests/conftest.py @@ -16,7 +16,7 @@ from trolldb.test_utils.mongodb_instance import running_prepared_database_context -@pytest.fixture() +@pytest.fixture def caplog(caplog: LogCaptureFixture): """This overrides the actual pytest ``caplog`` fixture. @@ -50,7 +50,7 @@ async def mongodb_fixture(_run_mongodb_server_instance): yield -@pytest.fixture() +@pytest.fixture def check_log(caplog) -> Callable: """A fixture to check the logs. It relies on the ``caplog`` fixture. diff --git a/trolldb/tests/test_recorder.py b/trolldb/tests/test_recorder.py index ceaf0bb..b454552 100644 --- a/trolldb/tests/test_recorder.py +++ b/trolldb/tests/test_recorder.py @@ -16,7 +16,7 @@ from trolldb.test_utils.mongodb_instance import running_prepared_database_context -@pytest.fixture() +@pytest.fixture def file_message(tmp_data_filename): """Create a string for a file message.""" return ('pytroll://segment/raster/L2/SAR file a001673@c20969.ad.smhi.se 2019-11-05T13:00:10.366023 v1.01 ' @@ -27,7 +27,7 @@ def file_message(tmp_data_filename): '"polarization": "hh", "sensor": "sar-c", "format": "GeoTIFF", "pass_direction": "ASCENDING"}') -@pytest.fixture() +@pytest.fixture def dataset_message(tmp_data_filename): """Create a string for a file message.""" return ('pytroll://segment/raster/L2/SAR dataset a001673@c20969.ad.smhi.se 2019-11-05T13:00:10.366023 v1.01 ' @@ -38,7 +38,7 @@ def dataset_message(tmp_data_filename): '"polarization": "hh", "sensor": "sar-c", "format": "GeoTIFF", "pass_direction": "ASCENDING"}') -@pytest.fixture() +@pytest.fixture def del_message(tmp_data_filename): """Create a string for a delete message.""" return ('pytroll://deletion del a001673@c20969.ad.smhi.se 2019-11-05T13:00:10.366023 v1.01 ' @@ -49,21 +49,21 @@ def del_message(tmp_data_filename): '"polarization": "hh", "sensor": "sar-c", "format": "GeoTIFF", "pass_direction": "ASCENDING"}') -@pytest.fixture() +@pytest.fixture def unknown_message(tmp_data_filename): """Create a string for an unknown message.""" return ("pytroll://deletion some_unknown_key a001673@c20969.ad.smhi.se 2019-11-05T13:00:10.366023 v1.01 " "application/json {}") -@pytest.fixture() +@pytest.fixture def tmp_data_filename(tmp_path): """Create a filename for the messages.""" filename = "20191103_153936-s1b-ew-hh.tiff" return tmp_path / filename -@pytest.fixture() +@pytest.fixture def config_file(tmp_path): """A fixture to create a config file for the tests.""" return create_config_file(tmp_path)