Skip to content

Commit

Permalink
Fix some typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicOram committed Jul 23, 2024
1 parent bbfb7ab commit 4e52a00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/dodal/devices/aperturescatterguard.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ def load_aperture_positions(self, positions: AperturePositions):
self.aperture_positions = positions

@AsyncStatus.wrap
async def set(self, pos: SingleAperturePosition):
async def set(self, value: SingleAperturePosition):
assert isinstance(self.aperture_positions, AperturePositions)
if pos not in self.aperture_positions.as_list():
raise InvalidApertureMove(f"Unknown aperture: {pos}")
if value not in self.aperture_positions.as_list():
raise InvalidApertureMove(f"Unknown aperture: {value}")

await self._safe_move_within_datacollection_range(pos.location)
await self._safe_move_within_datacollection_range(value.location)

def _get_motor_list(self):
return [
Expand Down
6 changes: 3 additions & 3 deletions src/dodal/devices/thawer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ThawerStates(str, Enum):
ON = "On"


class ThawingTimer(Device):
class ThawingTimer(Device, Stoppable):
def __init__(self, control_signal: SignalRW[ThawerStates]) -> None:
self._control_signal = control_signal
self._thawing_task: Task | None = None
Expand All @@ -33,7 +33,7 @@ async def set(self, time_to_thaw_for: float):
await self._control_signal.set(ThawerStates.OFF)

@AsyncStatus.wrap
async def stop(self, *args):
async def stop(self, *args, **kwargs):
if self._thawing_task:
self._thawing_task.cancel()

Expand All @@ -45,6 +45,6 @@ def __init__(self, prefix: str, name: str = "") -> None:
super().__init__(name)

@AsyncStatus.wrap
async def stop(self, *args):
async def stop(self, *args, **kwargs):
await self.thaw_for_time_s.stop()
await self.control.set(ThawerStates.OFF)

0 comments on commit 4e52a00

Please sign in to comment.