Skip to content

Commit 7c60274

Browse files
committed
Add brackets
1 parent 3b39cf2 commit 7c60274

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/thread.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ async def _close(
334334
await asyncio.gather(*tasks)
335335

336336
async def cancel_closure(self, auto_close: bool = False, all: bool = False) -> None:
337-
if self.close_task is not None and not auto_close or all:
337+
if self.close_task is not None and (not auto_close or all):
338338
self.close_task.cancel()
339339
self.close_task = None
340-
if self.auto_close_task is not None and auto_close or all:
340+
if self.auto_close_task is not None and (auto_close or all):
341341
self.auto_close_task.cancel()
342342
self.auto_close_task = None
343343

0 commit comments

Comments
 (0)