Skip to content

Commit d9419a1

Browse files
authored
fix cset type checking
This is a bit of a cover-all, but that's because `cset` has a very sloppy interface and lets you do weird things like cset(blockname=blockvalue) or cset("blockname", "blockvalue") etc. it at least passes pyright and allows all PV types. `None` will be covered by the underlying set_pv_value() call.
1 parent de42c82 commit d9419a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/genie_python/genie.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ def get_block_units(block_name: str) -> str | dict | None:
114114
@helparglist("...")
115115
@log_command_and_handle_exception
116116
def cset(
117-
*args: str,
117+
*args: PVValue,
118118
runcontrol: bool | None = None,
119119
lowlimit: float | None = None,
120120
highlimit: float | None = None,
121121
wait: bool | None = None,
122122
verbose: bool | None = None,
123-
**kwargs: bool | int | float | str | None,
123+
**kwargs: PVValue,
124124
) -> None:
125125
"""
126126
Sets the setpoint and runcontrol settings for blocks.

0 commit comments

Comments
 (0)