Skip to content

Commit c8c5056

Browse files
committed
Typecasted variables as literals to satisfy MyPy
1 parent e5ccf10 commit c8c5056

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/workflows/clem/test_align_and_merge.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from pathlib import Path
2+
from typing import Literal
23
from unittest.mock import MagicMock, patch
34

45
import pytest
@@ -24,9 +25,9 @@
2425

2526
# Align and merge settings
2627
crop_to_n_frames = 20
27-
align_self = "enabled"
28-
flatten = "max"
29-
align_across = "enabled"
28+
align_self: Literal["enabled", ""] = "enabled"
29+
flatten: Literal["mean", "min", "max", ""] = "max"
30+
align_across: Literal["enabled", ""] = "enabled"
3031

3132

3233
@pytest.fixture
@@ -38,7 +39,6 @@ def processed_dir(tmp_path: Path):
3839

3940
@pytest.fixture
4041
def image_stacks(processed_dir: Path):
41-
4242
image_dir = processed_dir / area_name / series_name
4343
image_dir.mkdir(parents=True, exist_ok=True)
4444

@@ -52,7 +52,6 @@ def image_stacks(processed_dir: Path):
5252

5353
@pytest.fixture
5454
def metadata(processed_dir: Path):
55-
5655
metadata_dir = processed_dir / area_name / series_name / "metadata"
5756
metadata_dir.mkdir(parents=True, exist_ok=True)
5857

@@ -70,7 +69,6 @@ def test_submit_cluster_request(
7069
metadata: Path,
7170
processed_dir: Path,
7271
):
73-
7472
# Construct the long series name
7573
series_name_long = "--".join(
7674
image_stacks[0].parent.relative_to(processed_dir).parts

0 commit comments

Comments
 (0)