Adjust to `trio>=0.34.0` invalid `Event` truthy checks
(cherry picked from commit 63ae23aa4ff229eb89cd970da132e997570c0afb)wkt/land_flake_update
parent
3ec447a45a
commit
6575db6463
|
|
@ -1695,7 +1695,7 @@ class MethodProxy:
|
|||
|
||||
ev = self.event_table.get(pattern)
|
||||
|
||||
if not ev or ev.is_set():
|
||||
if ev is None or ev.is_set():
|
||||
# print(f'inserting new data reset event item')
|
||||
ev = self.event_table[pattern] = trio.Event()
|
||||
|
||||
|
|
@ -1814,7 +1814,7 @@ async def relay_client_proxy_messages(
|
|||
reason = status_msg['reason']
|
||||
event = proxy.event_table.pop(reason, None)
|
||||
if (
|
||||
event
|
||||
event is not None
|
||||
and
|
||||
event.statistics().tasks_waiting
|
||||
):
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ async def _reconnect_forever(
|
|||
# if wrapper cancelled us, we expect it to also
|
||||
# have re-assigned a new event
|
||||
assert (
|
||||
nobsws._connected
|
||||
nobsws._connected is not None
|
||||
and not nobsws._connected.is_set()
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ async def graphics_update_loop(
|
|||
continue
|
||||
|
||||
ic = fast_chart.view._in_interact
|
||||
if ic:
|
||||
if ic is not None:
|
||||
fast_chart.pause_all_feeds()
|
||||
log.debug(
|
||||
f'Pausing chart updaates during interaction\n'
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ class ChartView(ViewBox):
|
|||
self.order_mode: bool = False
|
||||
|
||||
self.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||
self._in_interact: trio.Event | None = None
|
||||
self._in_interact: trio.Event|None = None
|
||||
self._interact_stack: ExitStack = ExitStack()
|
||||
|
||||
# TODO: probably just assign this whenever a new `PlotItem` is
|
||||
|
|
@ -619,7 +619,7 @@ class ChartView(ViewBox):
|
|||
to any waiters.
|
||||
|
||||
'''
|
||||
if self._in_interact:
|
||||
if self._in_interact is not None:
|
||||
try:
|
||||
self._interact_stack.close()
|
||||
self.chart.resume_all_feeds()
|
||||
|
|
@ -1154,7 +1154,7 @@ class ChartView(ViewBox):
|
|||
str,
|
||||
tuple[float, float],
|
||||
] | None = None,
|
||||
|
||||
|
||||
):
|
||||
profiler = Profiler(
|
||||
msg=f'ChartView.interact_graphics_cycle() for {self.name}',
|
||||
|
|
|
|||
Loading…
Reference in New Issue