Skip to content

Commit

Permalink
chore: pre-commit auto fixes [...]
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Nov 25, 2024
1 parent f09a329 commit 08d3050
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/gentropy/common/spark_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

import re
import sys
from collections.abc import Iterable
from functools import reduce, wraps
from itertools import chain
from typing import TYPE_CHECKING, Any, Callable, Iterable, Optional, TypeVar
from typing import TYPE_CHECKING, Any, Callable, Optional, TypeVar

import pyspark.sql.functions as f
import pyspark.sql.types as t
Expand Down
3 changes: 2 additions & 1 deletion src/gentropy/method/l2g/feature_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from __future__ import annotations

from typing import Any, Iterator, Mapping
from typing import Any
from collections.abc import Iterator, Mapping

from gentropy.dataset.l2g_features.colocalisation import (
EQtlColocClppMaximumFeature,
Expand Down
12 changes: 8 additions & 4 deletions tests/gentropy/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ def test_main_no_step() -> None:
override_key = "step"
expected = f"You must specify '{override_key}', e.g, {override_key}=<OPTION>\nAvailable options:"

with patch("sys.argv", ["cli.py"]), pytest.raises(
ConfigCompositionException, match=expected
with (
patch("sys.argv", ["cli.py"]),
pytest.raises(ConfigCompositionException, match=expected),
):
main()


def test_main_step() -> None:
"""Test the main function of the CLI complains about mandatory values."""
with patch("sys.argv", ["cli.py", "step=gene_index"]), pytest.raises(
MissingMandatoryValue, match="Missing mandatory value: step.target_path"
with (
patch("sys.argv", ["cli.py", "step=gene_index"]),
pytest.raises(
MissingMandatoryValue, match="Missing mandatory value: step.target_path"
),
):
main()

0 comments on commit 08d3050

Please sign in to comment.