/usr/lib/python3/dist-packages/twisted/python/__pycache__
NameSizeModeActions
compat.cpython-310.pyc153980644editdlrm
components.cpython-310.pyc143640644editdlrm
constants.cpython-310.pyc4680644editdlrm
context.cpython-310.pyc46570644editdlrm
deprecate.cpython-310.pyc252210644editdlrm
failure.cpython-310.pyc189600644editdlrm
fakepwd.cpython-310.pyc72920644editdlrm
filepath.cpython-310.pyc520500644editdlrm
formmethod.cpython-310.pyc127170644editdlrm
htmlizer.cpython-310.pyc35820644editdlrm
lockfile.cpython-310.pyc51380644editdlrm
log.cpython-310.pyc230160644editdlrm
logfile.cpython-310.pyc104590644editdlrm
modules.cpython-310.pyc254690644editdlrm
monkey.cpython-310.pyc23150644editdlrm
procutils.cpython-310.pyc13890644editdlrm
randbytes.cpython-310.pyc37350644editdlrm
rebuild.cpython-310.pyc55780644editdlrm
reflect.cpython-310.pyc191270644editdlrm
release.cpython-310.pyc15250644editdlrm
roots.cpython-310.pyc89330644editdlrm
runtime.cpython-310.pyc56170644editdlrm
sendmsg.cpython-310.pyc25800644editdlrm
shortcut.cpython-310.pyc24640644editdlrm
syslog.cpython-310.pyc33680644editdlrm
systemd.cpython-310.pyc30510644editdlrm
text.cpython-310.pyc42690644editdlrm
threadable.cpython-310.pyc35200644editdlrm
threadpool.cpython-310.pyc105020644editdlrm
url.cpython-310.pyc2790644editdlrm
urlpath.cpython-310.pyc92820644editdlrm
usage.cpython-310.pyc286350644editdlrm
util.cpython-310.pyc279390644editdlrm
versions.cpython-310.pyc3560644editdlrm
win32.cpython-310.pyc48410644editdlrm
zippath.cpython-310.pyc91460644editdlrm
zipstream.cpython-310.pyc88260644editdlrm
_appdirs.cpython-310.pyc8620644editdlrm
_inotify.cpython-310.pyc25800644editdlrm
_pydoctor.cpython-310.pyc57500644editdlrm
_release.cpython-310.pyc181330644editdlrm
_shellcomp.cpython-310.pyc188550644editdlrm
_textattributes.cpython-310.pyc106420644editdlrm
_tzhelper.cpython-310.pyc33850644editdlrm
_url.cpython-310.pyc2690644editdlrm
__init__.cpython-310.pyc5460644editdlrm
Edit: /usr/lib/python3/dist-packages/twisted/python/__pycache__/formmethod.cpython-310.pyc (12717B)
o bK/@sdZddlZddlmZmZmZGdddeZGdddeZGdd d Z Gd d d e Z Gd d d e Z Gddde Z Gddde Z Gddde ZGddde ZGdddeZGddde ZGddde ZGddde ZGdddeZGd d!d!eZGd"d#d#e ZGd$d%d%e Zd&d'ZGd(d)d)e ZGd*d+d+eZGd,d-d-ZGd.d/d/ZGd0d1d1ZdS)2z Form-based method objects. This module contains support for descriptive method signatures that can be used to format methods. N)AnyOptionalTuplec@eZdZdZddZdS) FormExceptionz*An error occurred calling the form method.cOstj|g|R||_dSN) Exception__init__ descriptions)selfargskwargsr;/usr/lib/python3/dist-packages/twisted/python/formmethod.pyr s zFormException.__init__N)__name__ __module__ __qualname____doc__r rrrrr rc@eZdZdZdS) InputErrorz, An error occurred with some input. Nrrrrrrrrrrc@sTeZdZUdZdZeed< dddZddZdd d Z d d Z d dZ ddZ dS)ArgumentzBase class for form arguments.NdefaultDefaultcCs>||_||_|dur |j}||_||_||_|si}||_dSr)name allowNonerdefault shortDesclongDeschints)r rrrr r!rrrrr %s zArgument.__init__cKs|j|dSr)r!update)r r rrraddHints3zArgument.addHintscCs|j||Sr)r!get)r rrrrrgetHint6szArgument.getHintcCs|jp|jSr)rr capitalizer rrrgetShortDescription9r$zArgument.getShortDescriptioncCs |jpdS)N)r r(rrrgetLongDescription<s zArgument.getLongDescriptioncCstd)z(Convert the value to the correct format.zimplement in subclass)NotImplementedErrorr valrrrcoerce?szArgument.coerce)NNNNrr) rrrrrr__annotations__r r#r&r)r+r/rrrrrs     rc@sFeZdZUdZdZeed<dZdZ       d ddZ d d Z dS) StringzA single string.r*rrNrc Cs(tj|||||||d||_||_dS)N)rrr r!r)rr minmax) r rrrr r!rr2r3rrrr Ks  zString.__init__cCsRt|}t||jkrtd|j|jdur%t||jkr%td|jt|S)N)Value must be at least %s characters long(Value must be at most %s characters long)strlenr2rr3)r r.srrrr/bs z String.coerce)NNNNrrN) rrrrrr6r0r2r3r r/rrrrr1Ds   r1c@r)TextzA long string.Nrrrrrr9krr9c@r)Passwordz-A string which should be obscured when input.Nrrrrrr:orr:c@r)VerifiedPasswordzCA string that should be obscured when input and needs verification.cCsvt|dks|d|dkrtdt|d}t||jkr&td|j|jdur9t||jkr9td|j|S)Nrrz%Please enter the same password twice.r4r5)r7rr6r2r3)r valsr8rrrr/vs zVerifiedPassword.coerceN)rrrrr/rrrrr;srr;c@r)HiddenzSA string which is not displayed. The passed default is used as the value. Nrrrrrr>rr>c@s6eZdZUdZdZeeed< d ddZddZ dS) IntegerzA single integer.Nrrc Ct|||||||dSrrr r rrrrr r!rrrr zInteger.__init__cCs:|s |jr dSzt|WStytd|w)Nz5{} is not valid, please enter a whole number, e.g. 10)striprint ValueErrorrformatr-rrrr/s  zInteger.coercerNNNN) rrrrrrrEr0r r/rrrrr?s  r?c@s(eZdZ     dddZddZdS) IntegerRangerNc Cs(||_||_tj|||||||ddS)N)rrrr r!)r2r3r?r ) r rr2r3rrrr r!rrrr s  zIntegerRange.__init__cCsZt||}|jr|dkr|S||jkrtd||j||jkr+td||j|S)Nz/Value {} is too small, it should be at least {}z.Value {} is too large, it should be at most {})r?r/rr2rrGr3)r r.resultrrrr/s   zIntegerRange.coercerHrrrr r/rrrrrIs rIc@s2eZdZUdZeeed< dddZddZdS) FloatNrrc Cr@rrArBrrrr rCzFloat.__init__cCs8|s |jr dSzt|WStytd|w)NzInvalid float: %s)rDrfloatrFrr-rrrr/s   z Float.coercerH) rrrrrrMr0r r/rrrrrLs  rLc@s.eZdZdZggddddfddZddZdS)Choicea The result of a choice between enumerated types. The choices should be a list of tuples of tag, value, and description. The tag will be the value returned if the user hits "Submit", and the description is the bale for the enumerated type. default is a list of all the values (seconds element in choices). If no defaults are specified, initially the first item will be selected. Only one item can (should) be selected at once. Nrc Cs<||_|r|s||ddtj|||||||ddS)Nrrr)choicesappendrr )r rrPrrr r!rrrrr s   zChoice.__init__cCs.|jD] \}}}||kr|Sqtd|)NzInvalid Choice: %s)rPr)r inIdentidentr.descrrrr/s  z Choice.coercerrrrr r/rrrrrNs  rNc@s.eZdZdZ      d ddZddZdS) Flagsa The result of a checkbox group or multi-menu. The flags should be a list of tuples of tag, value, and description. The tag will be the value returned if the user hits "Submit", and the description is the bale for the enumerated type. default is a list of all the values (second elements in flags). If no defaults are specified, initially nothing will be selected. Several items may be selected at once. rNrc Cs"||_tj|||||||ddSNrO)flagsrr )r rrXrrr r!rrrrr s  zFlags.__init__cCsN|sgSg}|D]}|jD]\}}}||kr||nq td|q|S)NzInvalid Flag: %s)rXrQr)r inFlagKeysoutFlags inFlagKeyflagKeyflagValflagDescrrrr/"s  z Flags.coerce)rrNNNrrUrrrrrVs  rVc@ eZdZdS) CheckGroupNrrrrrrrr`0r`c@r_) RadioGroupNrarrrrrc4rbrcc@seZdZddZdS)BooleancCs$|sdSt|}|dvrdSdS)Nr)nonffalse0r)r6lower)r inVallInValrrrr/9s  zBoolean.coerceN)rrrr/rrrrrd8s rdc@seZdZdddZddZdS)FilerNc Cstj||d||||ddSrWrA)r rrrr r!rrrr Cs z File.__init__cCs|s|jrdS|r |Std)Nz Invalid File)rr)r filerrrr/Hs z File.coerce)rNNNrKrrrrrmBs  rmcCst|}|dkr t|S)Nr)rErF)xrrr positiveIntQsrpc@s@eZdZUdZdZeeeeefed< d ddZ ddZ dS) Datez#A date -- (year, month, day) tuple.NrrcCs,t||||||||_|sd|_dSdS)N)irr)rr rrrBrrrr ]s  z Date.__init__cCst|dkr |jr dSz tt|\}}}Wn ty tdw||fdkr7t|s2td||||fSztj|}Wn t yItdw||krRtd|||fS)z(Return tuple of ints (year, month, day).)r*r*r*Nz Invalid date)r<z%d was not a leap year) tuplermaprprFrcalendarisleapmdays IndexError)r r yearmonthdayrwrrrr/es&       z Date.coercerH) rrrrrrrrEr0r r/rrrrrqXs  rqc@s0eZdZdZdgdddddfddZddZdS) Submitz0Submit button or a reasonable facsimile thereof.)r|submitz Submit formrNcCs&tj||||||d||_||_dS)N)rPrr r!)rNr rreset)r rrPr~rr rr!rrrr s  zSubmit.__init__cCs|jr|sdSt||Sr)rrNr/)r valuerrrr/s  z Submit.coercerUrrrrr||s r|c@r)PresentationHintz( A hint to a particular system. Nrrrrrrrrc@s*eZdZdZddZddZd ddZd S) MethodSignaturez$ A signature of a callable. cGs ||_dS)r*N)methodSignature)r sigListrrrr s zMethodSignature.__init__cCs"|jD] }|j|kr|SqdSr)rr)r rarrr getArguments  zMethodSignature.getArgumentFcCs t|||Sr) FormMethod)r callable takesRequestrrrmethod zMethodSignature.methodNF)rrrrr rrrrrrrs rc@s*eZdZdZd ddZddZddZd S) rz#A callable object with a signature.FcCs||_||_||_dSr) signaturerr)r rrrrrrr s zFormMethod.__init__cCs t|jjSr)rsrrr(rrrgetArgsrzFormMethod.getArgscOs|j|i|Sr)r)r r kwrrrcallr$zFormMethod.callNr)rrrrr rrrrrrrs   r)rrutypingrrrrrrrr1r9r:r;r>r?rIrLrNrVr`rcrdrmrprqr|rrrrrrrs4%'+$( $