Adjust to `trio>=0.34.0` invalid `Event` truthy checks
parent
eb0514c3a8
commit
63ae23aa4f
|
|
@ -1831,7 +1831,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()
|
||||
|
||||
|
|
@ -1953,7 +1953,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()
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -569,7 +569,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'
|
||||
|
|
|
|||
|
|
@ -639,7 +639,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
|
||||
|
|
@ -677,7 +677,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()
|
||||
|
|
@ -1212,7 +1212,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