{fV+ dZddlZddlZddlZddlmZddlmZddl m Z m Z m Z ddl mZdgZej eZd Zd d d d fdZej*dZej*dZdZdZej4dfdZy)zI Module version for monitoring CLI pipes (`... | python -m tqdm | ...`). N) literal_eval)indent) TqdmKeyError TqdmTypeErrortqdm) __version__mainctj||fd|vr4|jdD]} t||cSt |d||dk(r"|dk(s|dk(ry|dk(ryt |dz|z|d k(rat |d k(r|j Stjd |rtd |d j St |d||d k(r|S|dk(r t|S|dk(r t|St |d|#t$rYwxYw#t$r}t |d||d}~wwxYw#t$r}t |d||d}~wwxYw)Nz or z : boolTrueTFalseFchrrz^\\\w+$"strintfloat) logdebugsplitcastrlenencoderematchevalr ValueErrorr)valtyptexcs Q/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/tqdm/cli.pyrrsIIsCj }6"A C|## se3se,-- f} 6Msby '>C%K#-.. e| s8q=::<  88J $!C5 #**, ,se3se,-- e|  e| ;s8O g~ ;:  3%s3%( ));!  , ;3%s3% 01s : ;  ;3%s3% 01s : ;sA D* D%; E D"!D"% E.D??E E&E!!E&\ncyN)rs r#r)8sdTc @|j}|sB |j|}|st|ddy|||t|Ad}t|} |j|}|sY|rC|||r|d|j |zn|j |D] } ||  t|ddy |j |} | dkr||z }n7|||d| t|zz||rdn||d| zd}|| | zd}S)aZ Params ------ fin : binary file with `read(buf_size : int)` method fout : binary file with `write` (and optionally `flush`) methods. callback : function(float), e.g.: `tqdm.update` callback_len : If (default: True) do `callback(len(buffer))`. Otherwise, do `callback(data) for data in buffer.split(delim)`. flushcyr'r(r(r*r#r)zposix_pipe..Jstr*Nr*rcyr'r(r(r*r#r)zposix_pipe..as4r*r)writereadgetattrrcountrfind) finfoutdelimbuf_sizecallback callback_lenfp_writetmpbuf len_delimis r# posix_piper?7s=zzH ((8$C4g|46 SM SX  CE I hhx  Q5!112 YYu-  . 0GD'< 0 2 A1us  S3CJ// 0 ,QS3r7] <Ca)mn%C! r*z\n {4}(\S+)\s{2,}:\s*([^,]+)z\s*(?dnt7fddDr8tj8j;|dztj>dn5r3ddd dk7r(tj@j;ddd| tBj/dj3dgztt1ddd d dd } t&j)| | j%dddi} | j-D]*\}} |jEdd} tG| ||| |<,t&j)dtM| z| j%d d!}| j%d"d!}| j%d#d!}tO|||fdkDr tKd$ | j%d%d&}| j%d'd(}| j%d)d!}| j%d*d}| j%d+d}| j%d,d!rGd-d.tP}ntj8}t|d/|}ttjRd/tjR}|s|rcdd0l*m+ dd1l,m-}dd2l.m/ fd3}||d4|j3|d4||d5|j3|d6tj>d|r6|j:!td/j:G!fd7d.tP}|ry| jad8d9| jad:d| jad;d<t&j)| tdBi| 5"tc||d |"jddddy|d(k(ryt&j)| |j:}|s|r:tdBi| 5"|r"fd=}n"fd>}|D]}|||| dddyt|fi| D] }|| yt&j)| tdBi| 5"d!}|r"fd?}n|r"fd@}n"jd}d}tc||||||dddy#t$r.D]#}|j ds|t dd}nd}YwxYw#tH$r}tKtM|d}~wwxYw#1swYyxYw#1swYyxYw#1swYyxYw#tf$rPj;dA| ztjRtj8j:c}!|D] }!| wxYw)Cz Parameters (internal use only) --------- fp : file-like object for tqdm argv : list (default: sys.argv[1:]) Nrz--logz--log=INFOz/%(levelname)s:%(module)s:%(lineno)d:%(message)s)levelformat) z rHrc3K|]F}|dtvr9|ddk(rdndj|djdd|dg|ddHyw)rrr z --{0} : {2}{3}z --{0}=<{1}> : {2}{3}_-N)UNSUPPORTED_OPTSrGreplace).0otds r# zmain..sjMSV;K-K5#a&F*:&,ffV^^C-s1vA8;ABAMsA Az!Usage: tqdm [--help | options] z^ Options: -h, --help Print this help and exit. -v, --version Print version and exit.  c3&K|]}|v ywr'r(rPvargvs r#rRzmain..s 219 2)z-vz --versionrc3&K|]}|v ywr'r(rUs r#rRzmain..s 11Q$Y 1rX)z-hz--helpz--zError:Unknown argument: rrTrCrMrLzargs:bytesFupdate update_toz1Can only have one of --bytes --update --update_tor7r%r6r$teemanpathcomppathnullceZdZedZy)main..stdoutcyr'r()rLs r#r/zmain..stdout.writesr*N__name__ __module__ __qualname__ staticmethodr/r(r*r#stdoutrcsr*rjbuffer) resources)path)copyfilectdr%tjd|z |n-jd|5}t||dddtj d|y#1swY xYw)zcopy resource `name` to `dst`filesrNz written:%s)hasattrrrprmrinfo)namedstsrcrnrls r#cpzmain..cp sk9g.S!84!?@#F"50 S3/0s+00s A77Bztqdm.1z completion.shztqdm_completion.shc&eZdZefdZy)rcc|tj5|ddd|y#1swYxYw)N)rC)rexternal_write_mode)xfpr: stdout_writes r#r/zmain..stdout.writes411r:$  $ O$$s 2;Nre)r{r:r|sr#rjzmain..stdouts$$r*unitB unit_scale unit_divisoricVjt|jyr'r\numericdecoder>r!s r#r8zmain..callback-sHHWQXXZ%89r*cpjt|jjz yr'r\rrnrs r#r8zmain..callback0s#HHWQXXZ%8133%>?r*cVjt|jyr'rrs r#r8zmain..callback=s!45r*cpjt|jjz yr'rrs r#r8zmain..callback@s#!4qss!:;r*z Error: r()4sysrWindexr startswithrlogging basicConfigr1 version_infor__doc__r CLI_EXTRA_DOCdictRE_OPTSfindallrNpoprrsorteditemsrzipjoinstripanyrjr/r exitstderrRE_SHLEXrOrKeyErrorrrsumobjectstdin importlibrlosrmshutilrn setdefaultr?r\ Exception)#r{rWlog_idxlogLevelr>d opt_typesoropt_types_desc help_shortopts tqdm_argsrVedelim_per_charr\r]r7r6r^r_r`rjrrmrvr/r8r9rnr:rlr|r!s#`` @@@@@r#r r s] |xx| %**W%! $ ggx8PR))G3T\\6*m >#((F8d?3 4D DAJQTT + ,DIIdOHHUD IdSjjlFQ #s#A +#Ay|4 ! # 'C N*+"w6x/MM+u5  2 3a 7RS S 8==S1 gv.mmE5)-- 40==T2 == '   ZZFVXv6F 8SYY7 h +  ' ,"8TYYw9:#?DIIh8L$MN HHQK !<rs '22 (g!#*L!'*6&t "**4 5 2::8 96  F JJTiSr*