Skip to content

Commit 75c2eab

Browse files
committed
fix(bl_state): correct docstring examples
1 parent 679d2b9 commit 75c2eab

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

bec_lib/bec_lib/bl_states.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,10 @@ class ShutterState(DeviceBeamlineState[DeviceStateConfig]):
327327
A state that checks if the shutter is open.
328328
329329
Example:
330-
shutter_state = ShutterState(name="shutter_open")
331-
shutter_state.configure(device="shutter1")
330+
shutter_state = DeviceStateConfig(
331+
name="shutter_open",
332+
device="shutter1",
333+
)
332334
bec.beamline_states.add(shutter_state)
333335
"""
334336

@@ -352,8 +354,14 @@ class DeviceWithinLimitsState(DeviceBeamlineState[DeviceWithinLimitsStateConfig]
352354
A state that checks if a positioner is within limits.
353355
354356
Example:
355-
device_state = DeviceWithinLimitsState(name="sample_x_within_limits")
356-
device_state.configure(device="sample_x", signal="sample_x_signal_name", low_limit=0.0, high_limit=10.0)
357+
device_state = DeviceWithinLimitsStateConfig(
358+
name="samx_within_limits",
359+
title="samx within 0-10",
360+
device="samx",
361+
signal="samx",
362+
low_limit=0.0,
363+
high_limit=10.0,
364+
)
357365
bec.beamline_states.add(device_state)
358366
359367
"""

0 commit comments

Comments
 (0)