Skip to content

Commit 405bfb8

Browse files
committed
[fix] type error for compatibility with python 3.8
1 parent 054732e commit 405bfb8

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

plugins/sparc2_alignment_data_collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def _generate_acquisition_path(
587587
l_values: list,
588588
s_values: list,
589589
z_values: list,
590-
) -> Tuple[numpy.ndarray, list[int]]:
590+
) -> Tuple[numpy.ndarray, List[int]]:
591591
"""
592592
Generates an acquisition path by traversing concentric shells around the
593593
aligned mirror position. Uses a triple snake pattern to minimize movement:

src/odemis/acq/align/goffset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ def _do_auto_align_grating_detector_offsets(future: model.ProgressiveFuture,
606606
:raises CancelledError: if the operation is cancelled
607607
"""
608608

609-
results: dict[tuple, bool] = {}
609+
results: Dict[tuple, bool] = {}
610610
original_pos = {k: v for k, v in spectrograph.position.value.items()
611611
if k in ("wavelength", "grating")}
612612

src/odemis/gui/cont/multi_point_correlation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import threading
2929
import time
3030
from enum import Enum
31-
from typing import List, Union, Optional, Tuple
31+
from typing import List, Union, Optional, Tuple, Dict
3232

3333
import numpy
3434
import wx
@@ -220,9 +220,9 @@ def __init__(self, frame):
220220
# The keys will be tuples of (shape, position)
221221
# The values will be sets of stream indices
222222
self.stream_groups: Optional[
223-
dict[tuple[tuple[int], tuple[float]], list[int]]] = None # Dictionary to hold the stream groups
223+
Dict[Tuple[Tuple[int], Tuple[float]], List[int]]] = None # Dictionary to hold the stream groups
224224
# Key of the selected group chosen previously
225-
self.previous_group: Optional[tuple[tuple[int], tuple[float]]] = None
225+
self.previous_group: Optional[Tuple[Tuple[int], Tuple[float]]] = None
226226

227227
# Interpolate the fm streams such that the pixel size in z is the same as in x and y
228228
streams_list = []

0 commit comments

Comments
 (0)