Files
ServerSync/lib/invoke/parser/__pycache__/argument.cpython-314.pyc

94 lines
8.7 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
t<10>i<EFBFBD><00><00>2<00>^RIHtHtHtHt!RR4tR#)<05>)<04>Any<6E>Iterable<6C>Optional<61>Tuplec <00>0a<00>]tRt^toRtRR]RRRRRR3 V3RlRlltV3RlRlt]V3RlR l4t ]V3R
lR l4t
]V3R lR l4t ]V3RlRl4t ] PV3RlRl4t RV3RlRllt]V3RlRl4tRtVtR#)<19>Argumenta<74>
A command-line argument/flag.
:param name:
Syntactic sugar for ``names=[<name>]``. Giving both ``name`` and
``names`` is invalid.
:param names:
List of valid identifiers for this argument. For example, a "help"
argument may be defined with a name list of ``['-h', '--help']``.
:param kind:
Type factory & parser hint. E.g. ``int`` will turn the default text
value parsed, into a Python integer; and ``bool`` will tell the
parser not to expect an actual value but to treat the argument as a
toggle/flag.
:param default:
Default value made available to the parser if no value is given on the
command line.
:param help:
Help text, intended for use with ``--help``.
:param positional:
Whether or not this argument's value may be given positionally. When
``False`` (default) arguments must be explicitly named.
:param optional:
Whether or not this (non-``bool``) argument requires a value.
:param incrementable:
Whether or not this (``int``) argument is to be incremented instead of
overwritten/assigned to.
:param attr_name:
A Python identifier/attribute friendly name, typically filled in with
the underscored version when ``name``/``names`` contain dashes.
.. versionadded:: 1.0
NFc<00><><<01>V^8<>dQhRS[S[,RS[S[,RS[RS[S[,RS[S[,RS[RS[RS[R S[S[,R
R /
#) <0C><00>name<6D>names<65>kind<6E>default<6C>help<6C>
positional<EFBFBD>optional<61> incrementable<6C> attr_name<6D>returnN)r<00>strrr<00>bool)<02>format<61> __classdict__s"<22><>=/tmp/pip-target-zhdecbcm/lib/python/invoke/parser/argument.py<70> __annotate__<5F>Argument.__annotate__*s<><00><><00>$#<23>$#<23><16>s<EFBFBD>m<EFBFBD>$#<23><18><03>}<7D>$#<23><12> $#<23>
<1A>#<23><1D> $#<23> <17>s<EFBFBD>m<EFBFBD> $#<23><19>$#<23><17>$#<23><1C>$#<23><1C>C<EFBFBD>=<3D>$#<23>
<0E>$#<23>c
<08>t<00>V'dV'd \R4hV'gV'g \R4hV'd\V4VnMV'dV'g V3VnW0nRp
V\Jd.p
V'dTp
V
;VnVnW@nWPnW`n Wpn
W<>n W<>n R#)z8Cannot give both 'name' and 'names' arguments! Pick one.z(An Argument must have at least one name.N) <0A> TypeError<6F>tupler r <00>list<73> raw_value<75>_valuerrrrrr) <0B>selfr r r rrrrrr<00> initial_values &&&&&&&&&& r<00>__init__<5F>Argument.__init__*s<><00><00> <10>E<EFBFBD><1B>J<><0E> <0E><15><05><1B>F<>G<> G<> <10><1E>u<EFBFBD><1C>D<EFBFBD>J<EFBFBD> <11>%<25><1E><17>D<EFBFBD>J<EFBFBD><18> <09>'+<2B> <0A> <0F>4<EFBFBD><<3C><1E>M<EFBFBD> <18>#<23>M<EFBFBD>'4<>4<><04><0E><14><1B><1E> <0C><18> <09>$<24><0F> <20> <0A>*<2A><1A>"<22>rc<00> <<01>V^8<>dQhRS[/#<00>r
r<00>r)rrs"<22>rrrPs<00><><00>
<EFBFBD>
<EFBFBD>#<23>
rc<08><00>RpVP'd+RPRPVP44pRpVP'gVP'dRpVP'd
VR, pVP'd
VR, pRpVP
\ 8wd&RPVP
P4pRPVPPVPWV4#)<08>z ({})z, <20> <20>*<2A>?z [{}]z<{}: {}{}{}{}>)
<EFBFBD> nicknamesr<00>joinrrr r<00>__name__<5F> __class__r )r#<00>nicks<6B>flagsr s& r<00>__repr__<5F>Argument.__repr__Ps<><00><00><12><05> <0F>><3E>><3E>><3E><1B>N<EFBFBD>N<EFBFBD>4<EFBFBD>9<EFBFBD>9<EFBFBD>T<EFBFBD>^<5E>^<5E>#<<3C>=<3D>E<EFBFBD><12><05> <0F>?<3F>?<3F>?<3F>d<EFBFBD>m<EFBFBD>m<EFBFBD>m<EFBFBD><17>E<EFBFBD> <0F>?<3F>?<3F>?<3F> <11>S<EFBFBD>L<EFBFBD>E<EFBFBD> <0F>=<3D>=<3D>=<3D> <11>S<EFBFBD>L<EFBFBD>E<EFBFBD><12><04> <0F>9<EFBFBD>9<EFBFBD><03> <1B><1A>><3E>><3E>$<24>)<29>)<29>"4<>"4<>5<>D<EFBFBD><1F>&<26>&<26> <10>N<EFBFBD>N<EFBFBD> #<23> #<23>T<EFBFBD>Y<EFBFBD>Y<EFBFBD><05>U<EFBFBD>
<EFBFBD>
rc<00>0<<01>V^8<>dQhRS[S[,/#r()rr)rrs"<22>rrres<00><><00> /<2F> /<2F>h<EFBFBD>s<EFBFBD>m<EFBFBD> /rc <0C>P<00>VP;'gVP^,#)z<>
The canonical attribute-friendly name for this argument.
Will be ``attr_name`` (if given to constructor) or the first name in
``names`` otherwise.
.. versionadded:: 1.0
)rr <00>r#s&rr <00> Argument.nameds<00><00><14>~<7E>~<7E>.<2E>.<2E><14><1A><1A>A<EFBFBD><1D>.rc<00>4<<01>V^8<>dQhRS[S[R3,/#)r
r.)rr)rrs"<22>rrrqs<00><><00><1E><1E>5<EFBFBD><13>c<EFBFBD><18>?<3F>rc<08>(<00>VPR,#):<3A>NN)r r9s&rr/<00>Argument.nicknamesps<00><00><13>z<EFBFBD>z<EFBFBD>"<22>~<7E>rc<00> <<01>V^8<>dQhRS[/#r(<00>r)rrs"<22>rrrus<00><><00><14><14>T<EFBFBD>rc<08>Z<00>VP\JdR#VP'dR#R#)FT)r rrr9s&r<00> takes_value<75>Argument.takes_valuets#<00><00> <0F>9<EFBFBD>9<EFBFBD><04> <1C><18> <0F> <1D> <1D> <1D><18>rc<00> <<01>V^8<>dQhRS[/#r()r)rrs"<22>rrr}s<00><><00>H<01>H<01>s<EFBFBD>Hrc<08>N<00>VPe VP#VP#<00>N)r"rr9s&r<00>value<75>Argument.value|s <00><00>#<23>k<EFBFBD>k<EFBFBD>5<>t<EFBFBD>{<7B>{<7B>G<>4<EFBFBD><<3C><<3C>Grc<00>$<<01>V^8<>dQhRS[RR/#)r
<00>argrNr))rrs"<22>rrr<00>s<00><><00>'<27>'<27><13>'<27><14>'rc<08>,<00>VPVRR7R#)T)<01>castN)<01> set_value)r#rJs&&rrGrH<00>s<00><00> <0C><0E><0E>s<EFBFBD><14><0E>&rc<00>*<<01>V^8<>dQhRS[RS[RR/#)r
rGrLrN)rr)rrs"<22>rrr<00>s"<00><><00>"<22>"<22>s<EFBFBD>"<22>$<24>"<22>$<24>"rc <0C><>a<00>VSnRpV'd SPpSP\JdV3RlpSP'dV3RlpV!V4SnR#)a<>
Actual explicit value-setting API call.
Sets ``self.raw_value`` to ``value`` directly.
Sets ``self.value`` to ``self.kind(value)``, unless:
- ``cast=False``, in which case the raw value is also used.
- ``self.kind==list``, in which case the value is appended to
``self.value`` instead of cast & overwritten.
- ``self.incrementable==True``, in which case the value is ignored and
the current (assumed int) value is simply incremented.
.. versionadded:: 1.0
c<00><00>V#rF<00>)<01>xs&r<00><lambda><3E>$Argument.set_value.<locals>.<lambda><3E>s<00><00>rc<00>,<<01>SPV.,#rF<00>rG<00>rRr#s&<26>rrSrT<00>s<00><><00>T<EFBFBD>Z<EFBFBD>Z<EFBFBD>1<EFBFBD>#<23>-rc<00>*<<01>SP^,#)r=rVrWs&<26>rrSrT<00>s <00><><00>T<EFBFBD>Z<EFBFBD>Z<EFBFBD>!<21>^rN)r!r r rr")r#rGrL<00>funcsf&& rrM<00>Argument.set_value<75>sL<00><><00> <1F><04><0E><1A><04> <0F><17>9<EFBFBD>9<EFBFBD>D<EFBFBD> <0F>9<EFBFBD>9<EFBFBD><04> <1C>-<2D>D<EFBFBD> <0F> <1D> <1D> <1D>,<2C>D<EFBFBD><1A>5<EFBFBD>k<EFBFBD><04> rc<00> <<01>V^8<>dQhRS[/#r(r@)rrs"<22>rrr<00>s<00><><00> '<27> '<27>4<EFBFBD> 'rc <0C>p<00>VP\Jd\VP4#VPRJ#)z<>
Returns whether the argument was ever given a (non-default) value.
For most argument kinds, this simply checks whether the internally
stored value is non-``None``; for others, such as ``list`` kinds,
different checks may be used.
.. versionadded:: 1.3
N)r r rr"r9s&r<00> got_value<75>Argument.got_value<75>s.<00><00> <10>9<EFBFBD>9<EFBFBD><04> <1C><17><04> <0B> <0B>$<24> $<24><13>{<7B>{<7B>$<24>&<26>&r)
r"rrrrr r rrr!rQ)T)r1<00>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__rr%r5<00>propertyr r/rBrG<00>setterrMr]<00>__static_attributes__<5F>__classdictcell__)rs@rrrs<><00><><00><00> <08>H#<23>!<21><17>!%<25>"<22> <20><1E>#<23>#'<27>$#<23>$#<23>L
<EFBFBD>
<EFBFBD>(<0E> /<2F><0E> /<2F><0E><1E><0E><1E><0E><14><0E><14><0E>H<01><0E>H<01> <0B>\<5C>\<5C>'<27><12>'<27>"<22>"<22>@<0E> '<27><0E> 'rrN)<06>typingrrrrrrQrr<00><module>rhs<00><01>1<>1<> k'<27>k'r