7f FdZddlZddlZddlZddlmZddlmZm Z m Z m Z m Z m Z mZmZgdZedZdZejdZGd d eZ dd e eefd e ed ede ede ef dZ dd e eefd e ed ede edef dZde e dddfdZdede eeffdZeGddZGddZeGddZeeeefZeGddZ dS) z PEP 610 N) dataclass)AnyClassVarDictIterableOptionalTypeTypeVarUnion) DirectUrlDirectUrlValidationErrorDirInfo ArchiveInfoVcsInfoTzdirect_url.jsonz.^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$ceZdZdS)r N)__name__ __module__ __qualname__/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/models/direct_url.pyr r sDrr d expected_typekeydefaultreturncr||vr|S||}t||st|d|d|d|S)z3Get value from dictionary and verify expected type.z has unexpected type for z (expected )) isinstancer rrrrvalues r_getr#sb !|| cFE e] + + & Q Q Q Q Q Q Q    LrcRt||||}|t|d|S)Nz must have a value)r#r r!s r _get_requiredr%)s8 M3 0 0E }&#'A'A'ABBB LrinfosInfoTypecd|D}|stdt|dkrtd|dJ|dS)Ncg|]}||SNr).0infos r z#_exactly_one_of..3s 8 8 8dt'7T'7'7'7rz/missing one of archive_info, dir_info, vcs_infoz1more than one of archive_info, dir_info, vcs_infor)r len)r&s r_exactly_one_ofr02ss 8 8e 8 8 8E  & =    5zzA~~& ?    8    8Orkwargsc >d|DS)z Make dict excluding None values.ci|] \}}||| Sr*r)r+kvs r z _filter_none..Bs = = =TQq}Aq}}}r)items)r1s r _filter_noner8@s = =V\\^^ = = ==rceZdZUdZeed<eed<eed<dZeeed<e dee ee fdedfd Z de ee ffd Z dS) rvcs_infonamevcs commit_idNrequested_revisionrrc |dS|t|tdt|tdt|tdS)Nr<r=r>)r<r=r>)r%strr#clsrs r _from_dictzVcsInfo._from_dictMsS 94sae,,#AsK88#As,@AA    rcDt|j|j|jS)N)r<r>r=)r8r<r>r=selfs r_to_dictzVcsInfo._to_dictWs)#6n    r)rrrr;r__annotations__r@r>r classmethodrrrCrGrrrrrEsD( HHHNNN(, ,,, 8DcN3 8K   [  $sCx.      rrceZdZdZ d deedeeeefddfdZedeefdZ e j deeddfd Z e d eeee fdedfd Z deee ffd ZdS)r archive_infoNhashhashesrc"||_||_dSr*)rMrL)rFrLrMs r__init__zArchiveInfo.__init__bs   rc|jSr*)_hashrEs rrLzArchiveInfo.hashks zrr"c|} |dd\}}n #t$rtd|wxYw|j ||i|_n1||jvr(|j|_||j|<||_dS)N=r.z"invalid archive_info.hash format: )split ValueErrorr rMcopyrQ)rFr" hash_name hash_values rrLzArchiveInfo.hashos   (- C(;(;% ::   .BBB {"(*5 $+--"k..00 )3 I& s;rct|dS|t|tdt|tdS)NrLrMrLrM)r#r@dictrAs rrCzArchiveInfo._from_dicts9 94sQV,,T!T85L5LMMMMrc8t|j|jS)NrZ)r8rLrMrEs rrGzArchiveInfo._to_dicts4;????r)NN)rrrr;rr@rrOpropertyrLsetterrIrrCrGrrrrr_s6 D#+/smc3h(  hsmX [(3-D["N8DcN3N8ONNN[N @$sCx.@@@@@@rrceZdZUdZeed<dZeed<ede e e e fde dfdZ de e e ffdZd S) rdir_infor;FeditablerrcN|dS|t|tddS)NraF)rra)r%boolrAs rrCzDirInfo._from_dicts0 94sM!T:uMMMNNNNrc0t|jpdS)Nrc)r8rarEs rrGzDirInfo._to_dictsT]%:d;;;;rN)rrrr;rrHrardrIrrr@rrCrGrrrrrsD(HdO8DcN3O8KOOO[O <$sCx.<<<<<rs !!!!!!PPPPPPPPPPPPPPPPPPPP    GCLL, RZI J J      y   QU   CH~ &*1g 47 BJ1+  a[    QU CH~&*1g47BJ1+ 8HZ$89 j    >3>4S>>>>>           2)@)@)@)@)@)@)@)@X  < < < < < < <  < gw. / AEAEAEAEAEAEAE AEAEAEr