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