
    !h1                    \    S SK Jr  S SKJrJrJr  S SKJr  \" S5      rSS jr	    S	S jr
g)
    )annotations)AsyncGeneratorAsyncIteratorIterable)TypeVar_Tc                D   #    U  Vs/ s S h  vN oPM   N
 sn$ s  snf 7f)N )resultxs     \/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/scrapy/utils/asyncgen.pycollect_asyncgenr   	   s     #$$A$$$s$    
 c               ~   #    [        U [        5      (       a  U   Sh  vN nU7v   M  U  H  nU7v   M
     g N
 g7f)z:Wraps an iterable (sync or async) into an async generator.N)
isinstancer   )itrs     r   as_async_generatorr      s9      "m$$ 	!GAG 	rs   =;9;=;=N)r   zAsyncIterator[_T]returnzlist[_T])r   z Iterable[_T] | AsyncIterator[_T]r   zAsyncGenerator[_T])
__future__r   collections.abcr   r   r   typingr   r   r   r   r
       r   <module>r      s4    " C C T]%	(		r   