Skip to content

Commit

Permalink
typing compatible python=3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
seb5g committed May 17, 2024
1 parent 16e0469 commit b2d0ec4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/pymodaq/utils/leco/director_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
These directors correspond to the PymodaqListener
"""

from typing import Optional, Union
from typing import Optional, Union, List

from pyleco.directors.director import Director

Expand All @@ -26,7 +26,7 @@ def set_info(self, param: Parameter):
self.set_info_str(path=putils.get_param_path(param)[2:],
param_dict_str=ioxml.parameter_to_xml_string(param).decode())

def set_info_str(self, path: list[str], param_dict_str: str) -> None:
def set_info_str(self, path: List[str], param_dict_str: str) -> None:
self.ask_rpc(method="sef_info", path=path, param_dict_str=param_dict_str)


Expand Down
6 changes: 3 additions & 3 deletions src/pymodaq/utils/leco/leco_director.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import random

from typing import Callable, Sequence
from typing import Callable, Sequence, List

import pymodaq.utils.parameter.utils as putils
# object used to send info back to the main thread:
Expand Down Expand Up @@ -38,7 +38,7 @@ class LECODirector:
"move_abs", 'move_home', 'move_rel', 'get_actuator_value', 'stop_motion',
'position_is', 'move_done',
]
socket_types: list[str]
socket_types: List[str]

controller: GenericDirector
settings: Parameter
Expand Down Expand Up @@ -84,5 +84,5 @@ def emit_status(self, status: ThreadCommand) -> None:
super().emit_status(status=status) # type: ignore

# Methods accessible via remote calls
def set_info(self, path: list[str], param_dict_str: str) -> None:
def set_info(self, path: List[str], param_dict_str: str) -> None:
self.emit_status(ThreadCommand("set_info", attribute=[path, param_dict_str]))
4 changes: 2 additions & 2 deletions src/pymodaq/utils/leco/pymodaq_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class StrEnum(str, Enum):
pass
import logging
from threading import Event
from typing import Optional, Union
from typing import Optional, Union, List

from pyleco.core import COORDINATOR_PORT
from pyleco.utils.listener import Listener, PipeHandler
Expand Down Expand Up @@ -78,7 +78,7 @@ def extract_dwa_object(data_string: str) -> DataWithAxes:
return desererializer.dwa_deserialization()

# generic commands
def set_info(self, path: list[str], param_dict_str: str) -> None:
def set_info(self, path: List[str], param_dict_str: str) -> None:
self.signals.cmd_signal.emit(ThreadCommand("set_info", attribute=[path, param_dict_str]))

# detector commands
Expand Down

0 comments on commit b2d0ec4

Please sign in to comment.