Repository navigation
Replace hand-written sync wrappers with a blocking_wrapper; german word 'programm' - #47
Conversation
…ync; correct the german word "programm" to "progam"
|
This seems good to me but since I'm unfamiliar with ParamSpec I can't tell if there are any undesirable effects. @cpr-bar can you evaluate this? |
|
I got issues running the examples but that should be caused by your branch being behind our repo rather than the change (that issue was fixed recently) |
The It's also trivial to fix the pre-commit (rename I say 👍 |
|
I added aliases for the "program" changes to keep backwards compatibility. |
Changes
Adds a small
blocking_wrapperdecorator and uses it to generate the blocking (sync) version of the*_asyncmethods inCRIController, replacing the hand-writtenreturn _run_sync(self.xxx_async(...))wrappers.Function names with the german spelling 'programm' are changed into 'program'.
Details
ParamSpec, so IDEs still show the real parameters and return type of each sync method (e.g.set_dout(id: int, value: bool)).Blocking wrapper around :meth:CRIController.xxx_async``.Notes for review
set_dout("a")) as errors. With the generated methods it may not, so such mistakes only show up at runtime or in an external type check.Testing
start_program.pyand relative_move pass