refactor: replace bare except with BaseException in AsyncQueue (#6765)

## Description
Replaced a bare `except:` with `except BaseException:` in
`libs/langgraph/langgraph/_internal/_queue.py`.

## Motivation
Using a bare `except:` violates PEP 8 (E722). While functionally
equivalent to `except BaseException:`, making it explicit improves code
readability and satisfies static analysis tools.

This ensures that `asyncio.CancelledError` (which inherits from
`BaseException`) is still caught and handled correctly by the
cancellation logic in the `wait()` method, but without the ambiguity of
a bare except.
This commit is contained in:
Luka Aladashvili
2026-02-10 05:08:39 -08:00
committed by GitHub
parent f6d95abbe3
commit 84446f5ad8
+1 -1
View File
@@ -25,7 +25,7 @@ class AsyncQueue(asyncio.Queue):
self._getters.append(getter)
try:
await getter
except:
except BaseException:
getter.cancel() # Just in case getter is not done yet.
try:
# Clean self._getters from canceled getters.