mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
style: move anyio import to module level per Greptile review
This commit is contained in:
parent
de8552d92c
commit
28c7cc6efe
1 changed files with 1 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import anyio
|
||||
import asyncio
|
||||
import copy
|
||||
import enum
|
||||
|
|
@ -5147,8 +5148,6 @@ async def async_data_generator(
|
|||
# back to the connection pool. This prevents pool exhaustion when
|
||||
# clients disconnect mid-stream.
|
||||
# Shield from cancellation so the close awaits can complete.
|
||||
import anyio
|
||||
|
||||
with anyio.CancelScope(shield=True):
|
||||
if hasattr(response, "aclose"):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue