You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the scan_nd plan, it is not obvious how the adapter function works when _verify_1d_step is True.
It appears to be redefining per_step to be usable for the 1d case since the signatures of the one_nd_step and one_1d_step are slightly different. However the arguments passed to the adapter do not match the ones passed to user_per_step when doing this operation.
user_per_step=per_stepdefadapter(detectors, step, pos_cache):
# one_nd_step 'step' parameter is a dict; one_id_step 'step'# parameter is a value
(step,) =step.values()
return (yieldfromuser_per_step(detectors, motor, step))
per_step=adapter# type: ignore
Context
The issue came up while adding type hints to plans in #1712 , which showed a mismatch between the signatures of expression and variable:
src/bluesky/plans.py:1148: error: Incompatible types in assignment (expression has type "Callable[[Any, Any, Any], Any]", variable has type "Callable[[Sequence[Readable], Movable, Any, Callable[[Sequence[Readable]], Generator[Msg, Any, Mapping[str, Reading]]] | None], Generator[Msg, Any, Any]] | Callable[[Sequence[Readable], Mapping[Movable, Any], dict[Movable, Any], Callable[[Sequence[Readable]], Generator[Msg, Any, Mapping[str, Reading]]] | None], Generator[Msg, Any, Any]] | None") [assignment]
Temporary workaround was to #type: ignore it.
The text was updated successfully, but these errors were encountered:
Current Behavior
In the
scan_nd
plan, it is not obvious how theadapter
function works when_verify_1d_step
is True.It appears to be redefining
per_step
to be usable for the 1d case since the signatures of theone_nd_step
andone_1d_step
are slightly different. However the arguments passed to the adapter do not match the ones passed touser_per_step
when doing this operation.Context
The issue came up while adding type hints to plans in #1712 , which showed a mismatch between the signatures of expression and variable:
Temporary workaround was to
#type: ignore
it.The text was updated successfully, but these errors were encountered: