Skip to content

Commit

Permalink
made lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZohebShaikh committed Sep 18, 2024
1 parent f021a08 commit 41da0f4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/ophyd_async/core/_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ async def observe_signals_values(
*signals: SignalR[T],
timeout: float | None = None,
done_status: Status | None = None,
) -> AsyncGenerator[Tuple[SignalR[T], T], None]:
) -> AsyncGenerator[tuple[SignalR[T], T], None]:
"""Subscribe to the value of a signal so it can be iterated from.
Parameters
Expand All @@ -516,7 +516,6 @@ async def observe_signals_values(
async for value in observe_value(sig):
do_something_with(value)
"""

q: asyncio.Queue[tuple[SignalR[T], T | Status]] = asyncio.Queue()
if timeout is None:
get_value = q.get
Expand Down Expand Up @@ -554,7 +553,7 @@ def clear_signals():
else:
break
else:
yield item
yield item # type: ignore
finally:
for clear_signal in clear_signals:
clear_signal()
Expand Down Expand Up @@ -612,7 +611,7 @@ async def wait_for_value(
"""

if callable(match_value):
checker = _ValueChecker(match_value, match_value.__name__) # type: ignore
checker = _ValueChecker(match_value, match_value.__name__) # type: ignore
else:
checker = _ValueChecker(lambda v: v == match_value, repr(match_value))
await checker.wait_for_value(signal, timeout)
Expand All @@ -624,10 +623,8 @@ async def set_and_wait_for_other_value(
match_signal: SignalR[S],
match_value: S | Callable[[S], bool],
timeout: float = DEFAULT_TIMEOUT,

set_timeout: float | None = None,
):

"""Set a signal and monitor another signal until it has the specified value.
This function sets a set_signal to a specified set_value and waits for
Expand Down Expand Up @@ -685,7 +682,6 @@ async def set_and_wait_for_value(
timeout: float = DEFAULT_TIMEOUT,
status_timeout: float | None = None,
):

"""Set a signal and monitor it until it has that value.
Useful for busy record, or other Signals with pattern:
Expand Down

0 comments on commit 41da0f4

Please sign in to comment.