o [d @sRdZddlZddlmZddlmZdZdZdZd d Z d d Z e Z d dZ dS)N) get_ident)format_helpersPENDING CANCELLEDFINISHEDcCst|jdo |jduS)zCheck for a Future. This returns True when obj is a Future instance or is advertising itself as duck-type compatible by setting _asyncio_future_blocking. See comment in Future for more details. _asyncio_future_blockingN)hasattr __class__r )objrr+/usr/lib/python3.10/asyncio/base_futures.pyisfutures rcCst|}|sd}dd}|dkr||dd}n0|dkr0d||dd||dd}n|dkrId||dd|d||d d}d |d S) #helper function for Future.__repr__cSs t|dS)Nr)r_format_callback_source)callbackrrr format_cbs z$_format_callbacks..format_cbrrz{}, {}z{}, <{} more>, {}zcb=[])lenformat)cbsizerrrr _format_callbackss& rc Cs|jg}|jtkrI|jdur|d|jn/t|tf}|tvr(d}nt|z t |j }Wt |nt |w|d||j rT|t|j |jrk|jd}|d|dd|d |S) rNz exception=z...zresult=rz created at r:r)_statelower _FINISHED _exceptionappendidr _repr_runningaddreprlibrepr_resultdiscard _callbacksr_source_traceback)futureinfokeyresultframerrr _future_repr_info7s$     r0)__all__r%_threadrrr_PENDING _CANCELLEDrrrsetr#r0rrrr s