@@ -150,7 +150,7 @@ def __aiter__(self) -> AsyncIterator[Any]:
150150
151151 @override
152152 def __getstate__ (self ) -> Mapping [str , Any ]:
153- import cloudpickle
153+ import cloudpickle # noqa: PLC0415
154154
155155 return {
156156 "shards" : cloudpickle .dumps (self ._shards ),
@@ -159,7 +159,7 @@ def __getstate__(self) -> Mapping[str, Any]:
159159
160160 @override
161161 def __setstate__ (self , state : Mapping [str , Any ]) -> None :
162- import cloudpickle
162+ import cloudpickle # noqa: PLC0415
163163
164164 cache : Shard = cloudpickle .loads (state ["cache" ])
165165 shards : tuple [Shard ] = cloudpickle .loads (state ["shards" ])
@@ -322,7 +322,7 @@ def stats(self, *, enable: bool = True, reset: bool = False) -> Stats:
322322 @override
323323 async def astats (self , * , enable : bool = True , reset : bool = False ) -> Stats :
324324 validate_installed ("anyio" , "Consider installing extra `asyncio`." )
325- import anyio
325+ import anyio # noqa: PLC0415
326326
327327 hits , misses = 0 , 0
328328
@@ -348,7 +348,7 @@ def close(self) -> None:
348348 @override
349349 async def aclose (self ) -> None :
350350 validate_installed ("anyio" , "Consider installing extra `asyncio`." )
351- import anyio
351+ import anyio # noqa: PLC0415
352352
353353 await self .conn .aclose ()
354354 async with anyio .create_task_group () as task_group :
@@ -704,7 +704,7 @@ async def aupdate_settings(
704704 ** kwargs : Unpack [SettingsKwargs ],
705705 ) -> None :
706706 validate_installed ("anyio" , "Consider installing extra `asyncio`." )
707- import anyio
707+ import anyio # noqa: PLC0415
708708
709709 settings = cache_utils .combine_settings (settings , kwargs )
710710 async with anyio .create_task_group () as task_group :
0 commit comments