Skip to content

Commit 70babfd

Browse files
committed
Formatting changes
1 parent 33c64d4 commit 70babfd

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ._pmacIO import Pmac, PmacMotor
2-
from ._pmacTrajectory import PmacTrajectoryTriggerLogic, PmacTrajInfo
1+
from ._pmac_io import Pmac, PmacMotor
2+
from ._pmac_trajectory import PmacTrajectoryTriggerLogic, PmacTrajInfo
33

44
__all__ = ["Pmac", "PmacMotor", "PmacTrajectoryTriggerLogic", "PmacTrajInfo"]

src/ophyd_async/epics/pmac/_pmacIO.py renamed to src/ophyd_async/epics/pmac/_pmac_io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ class PmacMotor(motor.Motor):
5151
"""Device that moves a PMAC Motor record"""
5252

5353
def __init__(self, prefix: str, name: str = "") -> None:
54-
self.CsAxis = epics_signal_r(str, f"{prefix}:CsAxis_RBV")
55-
self.CsPort = epics_signal_r(str, f"{prefix}:CsPort_RBV")
54+
self.cs_axis = epics_signal_r(str, f"{prefix}:CsAxis_RBV")
55+
self.cs_port = epics_signal_r(str, f"{prefix}:CsPort_RBV")
5656
super().__init__(prefix=prefix, name=name)

src/ophyd_async/epics/pmac/_pmacTrajectory.py renamed to src/ophyd_async/epics/pmac/_pmac_trajectory.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import time
2-
from typing import Any
2+
from typing import Any, Literal
33

44
import numpy as np
55
import numpy.typing as npt
@@ -17,7 +17,7 @@
1717

1818

1919
class PmacTrajInfo(BaseModel):
20-
spec: Spec = Field(default=None)
20+
spec: Spec[PmacMotor | Literal["DURATION"]] = Field(default=None)
2121

2222

2323
class PmacTrajectoryTriggerLogic(FlyerController[PmacTrajInfo]):
@@ -201,8 +201,8 @@ async def get_cs_info(self, motor: PmacMotor) -> tuple[str, int]:
201201
cs_index = int(split[1].strip()) - 1
202202
else:
203203
# Raw Motor
204-
cs_port = await motor.CsPort.get_value()
205-
cs_axis = await motor.CsAxis.get_value()
204+
cs_port = await motor.cs_port.get_value()
205+
cs_axis = await motor.cs_axis.get_value()
206206
cs_index = "ABCUVWXYZ".index(cs_axis)
207207

208208
return cs_port, cs_index

tests/epics/pmac/test_pmac.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ async def sim_y_motor():
3636
set_mock_value(sim_motor.max_velocity, 5)
3737
set_mock_value(sim_motor.velocity, 0.5)
3838
set_mock_value(sim_motor.output_link, "@asyn(BRICK1,8)")
39-
set_mock_value(sim_motor.CsAxis, "Y")
40-
set_mock_value(sim_motor.CsPort, "BRICK1.CS3")
39+
set_mock_value(sim_motor.cs_axis, "Y")
40+
set_mock_value(sim_motor.cs_port, "BRICK1.CS3")
4141

4242
yield sim_motor
4343

0 commit comments

Comments
 (0)