From eee1c15d2c669d6c021f7049a8c8ef1a686d1d80 Mon Sep 17 00:00:00 2001 From: Matthias Wolf Date: Mon, 12 Aug 2024 15:49:34 +0200 Subject: [PATCH] Lint. --- src/functionalizer/filters/definitions.py | 2 +- tests/test_data_input_sonata.py | 2 +- tests/test_filters.py | 12 ++++-------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/functionalizer/filters/definitions.py b/src/functionalizer/filters/definitions.py index 59cd9c1..4701103 100644 --- a/src/functionalizer/filters/definitions.py +++ b/src/functionalizer/filters/definitions.py @@ -39,7 +39,7 @@ def load(*dirnames: str) -> None: class FilterInitializationError(RuntimeError): - pass + """Error to be raised when filters should be skipped.""" # --------------------------------------------------- diff --git a/tests/test_data_input_sonata.py b/tests/test_data_input_sonata.py index e41c28a..34f3706 100644 --- a/tests/test_data_input_sonata.py +++ b/tests/test_data_input_sonata.py @@ -6,7 +6,7 @@ import numpy import pytest import sparkmanager as sm -from conftest import DEFAULT_ARGS, DATADIR, create_functionalizer +from conftest import DATADIR, DEFAULT_ARGS, create_functionalizer from functionalizer.io.circuit import BRANCH_COLUMNS, EdgeData from functionalizer.utils.conf import Configuration diff --git a/tests/test_filters.py b/tests/test_filters.py index a0086fc..fda1680 100644 --- a/tests/test_filters.py +++ b/tests/test_filters.py @@ -4,7 +4,7 @@ import pyspark.sql.functions as F import pytest import sparkmanager as sm -from conftest import DEFAULT_ARGS, DATADIR, create_functionalizer +from conftest import DATADIR, DEFAULT_ARGS, create_functionalizer from functionalizer.utils.spark import cache_broadcast_single_part NUM_AFTER_DISTANCE = 226301 @@ -57,17 +57,13 @@ def test_spine_morphos(self, fz): class TestBogusFilterInitialization: """Test initialization of optional filters""" - @pytest.mark.parametrize("fz", [{"circuit_config": DATADIR / "circuit_config_invalid.json"}], indirect=True) + @pytest.mark.parametrize( + "fz", [{"circuit_config": DATADIR / "circuit_config_invalid.json"}], indirect=True + ) def test_spine_morphos(self, fz): with pytest.raises(AssertionError): fz.process_filters(filters=["SpineMorphologies"]) -class TestFilterInitialization: - """Test initialization of optional filters""" - - def test_spine_morphos(self, fz): - fz.process_filters(filters=["SpineMorphologies"]) - @pytest.mark.slow class TestFilters(object):