Files
ServerSync/lib/questionary/prompts/__pycache__/checkbox.cpython-314.pyc

133 lines
16 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
9<><39>i,-<00> <00>L<00>^RIt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^R IH t ^R
I
H t ^R I H t ^R IHt^R IHt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^RI H!t!^RI"H#t#RR]]RRRRRRRR3 RRllt$R#)<1E>N)<01>Any)<01>Callable)<01>Dict)<01>List)<01>Optional)<01>Sequence)<01>Tuple)<01>Union)<01> Application)<01> FormattedText)<01> KeyBindings)<01>Keys)<01>Style)<01>utils)<01>DEFAULT_QUESTION_PREFIX)<01>DEFAULT_SELECTED_POINTER)<01> INVALID_INPUT)<01>common)<01>Choice)<01>InquirerControl)<01> Separator)<01>Question)<01>merge_styles_defaultc<00><00>R#)T<>)<01>as&<26>C/tmp/pip-target-wqrk2shd/lib/python/questionary/prompts/checkbox.py<70><lambda>r!s<00><00>$<24>TFc <00>x<00>V^8<>dQhR\R\\\\\\\
3,3,,R\ \,R\\\,.\\\3,3,R\R\ \,R\ \,R\ \\\\\\
3,3,,R \R
\R \R \\\R 3,R\ \,R\R\
R\/#)<12><00>message<67>choices<65>default<6C>validate<74>qmark<72>pointer<65>style<6C>initial_choice<63>use_arrow_keys<79> use_jk_keys<79>use_emacs_keys<79>use_search_filterN<72> instruction<6F>show_description<6F>kwargs<67>return) <0C>strrr
rrrrrr<00>boolrr)<01>formats"r<00> __annotate__r5s <00><00>j<06>j<06> <10>j<06> <15>e<EFBFBD>C<EFBFBD><16><14>c<EFBFBD>3<EFBFBD>h<EFBFBD><1E>7<>8<> 9<>j<06><16>c<EFBFBD>]<5D>j<06><17><04>S<EFBFBD> <09>{<7B>E<EFBFBD>$<24><03>)<29>$4<>4<>5<> j<06>
<0F> j<06> <16>c<EFBFBD>]<5D> j<06> <14>E<EFBFBD>?<3F>j<06><1D>U<EFBFBD>3<EFBFBD><06><04>S<EFBFBD>#<23>X<EFBFBD><0E>#><3E>?<3F>@<40>j<06><19>j<06><16>j<06><19>j<06><1D>S<EFBFBD>$<24><04>_<EFBFBD>-<2D>j<06><1A>#<23><1D>j<06><1B>j<06><12>j<06> <0E>!jrc <04>:aaaa a aaa<1F>V'gV 'gV
'g \R4hV 'dS 'd \R4h\\R.4V.4p\S4'g \R4h\ VVVVV R7oRVV VVV 3RllpRV3RlloR VV3R
llo\
P !SV3/VBp\4pVP\PR R 7VP\PR R 7R 44pVPRR R 7VVV3Rl4pTPS 'd\PMRR R 7VVV3Rl4pTPS 'd\PMRR R 7VVV3Rl4pV3RlpV3RlpS 'duV3Rlp\PF3pV\P 9dKVPVR R 7!V4K5 VP\P"R R 7!V4V'dOVP\P$R R 7!V4VP\P&R R 7!V4V 'd3VPRR R 7!V4VPRR R 7!V4V
'dOVP\P(R R 7!V4VP\P*R R 7!V4VP\P,R R 7VVV3Rl4pVP\P.4R4p\1\3RRVRVRV/\4P6!V\2P84B4#) u<> Ask the user to select from a list of items.
This is a multiselect, the user can choose one, none or many of the
items.
Example:
>>> import questionary
>>> questionary.checkbox(
... 'Select toppings',
... choices=[
... "Cheese",
... "Tomato",
... "Pineapple",
... ]).ask()
? Select toppings done (2 selections)
['Cheese', 'Pineapple']
.. image:: ../images/checkbox.gif
This is just a really basic example, the prompt can be customised using the
parameters.
Args:
message: Question text
choices: Items shown in the selection, this can contain :class:`Choice` or
or :class:`Separator` objects or simple items as strings. Passing
:class:`Choice` objects, allows you to configure the item more
(e.g. preselecting it or disabling it).
default: Default return value (single value). If you want to preselect
multiple items, use ``Choice("foo", checked=True)`` instead.
validate: Require the entered value to pass a validation. The
value can not be submitted until the validator accepts
it (e.g. to check minimum password length).
This should be a function accepting the input and
returning a boolean. Alternatively, the return value
may be a string (indicating failure), which contains
the error message to be displayed.
qmark: Question prefix displayed in front of the question.
By default this is a ``?``.
pointer: Pointer symbol in front of the currently highlighted element.
By default this is a ``»``.
Use ``None`` to disable it.
style: A custom color and style for the question parts. You can
configure colors as well as font types for different elements.
initial_choice: A value corresponding to a selectable item in the choices,
to initially set the pointer position to.
use_arrow_keys: Allow the user to select items from the list using
arrow keys.
use_jk_keys: Allow the user to select items from the list using
`j` (down) and `k` (up) keys.
use_emacs_keys: Allow the user to select items from the list using
`Ctrl+N` (down) and `Ctrl+P` (up) keys.
use_search_filter: Flag to enable search filtering. Typing some string will
filter the choices to keep only the ones that contain the
search string.
Note that activating this option disables "vi-like"
navigation as "j" and "k" can be part of a prefix and
therefore cannot be used for navigation
instruction: A message describing how to navigate the menu.
show_description: Display description of current selection if available.
Returns:
:class:`Question`: Question instance, ready to be prompted (using ``.ask()``).
zOSome option to move the selection is required. Arrow keys or j/k or Emacs keys.zSCannot use j/k keys with prefix filter search, since j/k can be part of the prefix.zvalidate must be callable)r'r)r/c<00>\<00>V^8<>dQhR\\\\3,,/#<00>r!r1)rr r2)r4s"rr5<00>checkbox.<locals>.__annotate__<5F>s <00><00>,<16>,<16>t<EFBFBD>E<EFBFBD>#<23>s<EFBFBD>(<28>O<EFBFBD>4<>,rc
<00><><<05>.pVPRS34VPRRPS434SP'Ed0\SP4pV^8XdVPR4V#V^8Xd<>\ SP 4^,P\4'd\SP 4^,PpTPRRPVUu.uF q3^,NK up434V#VPRRPSP 4^,P434V#VPRRPV434V#SeVPRS34V#TPRRS'dR MR
R S'dR MR R S'dRMR R234V#uupi)z class:qmarkzclass:questionz {} <20> class:answer<65>z[{}]zdone ({} selections)zclass:instructionz-(Use arrow keys to move, <space> to select, <zctrl-arz> to toggle, <<3C>iz > to invertz, type to filter<65>))r;<00>done)
<EFBFBD>appendr4<00> is_answered<65>len<65>selected_options<6E>
isinstance<EFBFBD>get_selected_values<65>title<6C>list<73>join) <09>tokens<6E> nbr_selected<65>ts<74>token<65>icr.r"r&r-s <20><><EFBFBD><EFBFBD><EFBFBD>r<00>get_prompt_tokens<6E>#checkbox.<locals>.get_prompt_tokens<6E>s<><00><><00><13><06><0E> <0A> <0A>}<7D>e<EFBFBD>,<2C>-<2D><0E> <0A> <0A>'<27><16><1D><1D>w<EFBFBD>)?<3F>@<40>A<> <0A>><3E>><3E>><3E><1E>r<EFBFBD>2<>2<>3<>L<EFBFBD><1B>q<EFBFBD> <20><16> <0A> <0A>6<>7<>F<16> <0A>E<1E><11>"<22><1D>b<EFBFBD>4<>4<>6<>q<EFBFBD>9<>?<3F>?<3F><14>F<>F<><1B>/<2F>/<2F>1<>!<21>4<>:<3A>:<3A>B<EFBFBD><1A>M<EFBFBD>M<EFBFBD>*<2A><1E>G<EFBFBD>G<EFBFBD>2<EFBFBD>$><3E>2<EFBFBD>%<25>1<EFBFBD>X<EFBFBD>X<EFBFBD>2<EFBFBD>$><3E>?<3F><1A><16>><16> <0A>1<1B>M<EFBFBD>M<EFBFBD>*<2A>"<22>M<EFBFBD>M<EFBFBD>"<22>*@<40>*@<40>*B<>1<EFBFBD>*E<>*K<>*K<>L<><1A><16>0<16> <0A>#<17> <0A> <0A>#<23>%;<3B>%B<>%B<><<3C>%P<>Q<><12>"<16> <0A><1B>&<26><16> <0A> <0A>2<>K<EFBFBD>@<40>A<><16> <0A><17> <0A> <0A>+<2B><1C>(9<>H<EFBFBD>s<EFBFBD>C<>D<1C>(9<>H<EFBFBD>s<EFBFBD>C<>;<3B>1B<31>-<2D><02>K<>1<EFBFBD> N<01><16> <12><16> <0A><>9%?s<00>3Gc<00>:<00>V^8<>dQhR\\,/#r8)rr)r4s"rr5r9<00>s<00><00>;<3B>;<3B><14>c<EFBFBD><19>;rc<00>`<<01>SP4Uu.uFqPNK up#uupi<00>N)rE<00>value)<02>crMs <20>rrE<00>%checkbox.<locals>.get_selected_values<65>s(<00><><00>!#<23>!7<>!7<>!9<>:<3A>!9<>A<EFBFBD><07><07>!9<>:<3A>:<3A><>:s<00>+c<00>F<00>V^8<>dQhR\\,R\/#)r!<00>selected_valuesr1)rr2r3)r4s"rr5r9<00>s<00><00><15><15>D<EFBFBD><13>I<EFBFBD><15>$<24>rc<00><><<02>S!V4pVRJpV'g'VRJd\pM \V4p\RV3.4pV'gSP'd
XSnV#RSnV#)TFzclass:validation-toolbarN)rr2r <00>submission_attempted<65> error_message)rW<00>verdict<63>valid<69>
error_textrZrMr%s& <20><>r<00>perform_validation<6F>$checkbox.<locals>.perform_validation<6F>sy<00><><00><1A>?<3F>+<2B><07><17>4<EFBFBD><0F><05><14><16>%<25><1F>*<2A>
<EFBFBD> <20><17>\<5C>
<EFBFBD>)<29>,F<>
<EFBFBD>+S<>*T<>U<>M<EFBFBD>"'<27>2<EFBFBD>+B<>+B<>+B<>M<EFBFBD> <0B><18><15> <0C>IM<01> <0B><18><15> rT)<01>eagerc<00>H<00>VPP\RR7R#)zclass:aborting)<02> exceptionr(N)<03>app<70>exit<69>KeyboardInterrupt)<01>events&r<00>_<>checkbox.<locals>._<>s<00><00> <0E> <09> <09><0E><0E>!2<>:J<><0E>Kr<00> c<00><><<03>SP4PpVSP9dSPPV4MSPP V4S!S!44R#rR)<05>get_pointed_atrSrC<00>remover@)<05>_event<6E>pointed_choicerErMr^s& <20><><EFBFBD>r<00>toggle<6C>checkbox.<locals>.toggle<6C>sY<00><><00><1B>*<2A>*<2A>,<2C>2<>2<><0E> <19>R<EFBFBD>0<>0<> 0<> <0E> <1F> <1F> &<26> &<26>~<7E> 6<> <0E> <1F> <1F> &<26> &<26>~<7E> 6<><1A>.<2E>0<>1rr=c<00><<03>SPUu.uFXp\V\4'dKVPSP9gK8VP
'dKLVPNKZ ppVSnS!S!44R#uupirR)r#rDrrSrC<00>disabled)rmrT<00>inverted_selectionrErMr^s& <20><><EFBFBD>r<00>invert<72>checkbox.<locals>.invert<72>s{<00><><00><18>Z<EFBFBD>Z<EFBFBD>
<EFBFBD><1F><01><1D>a<EFBFBD><19>+<2B> <14><12><07><07>r<EFBFBD>2<>2<>2<> <14><16>J<EFBFBD>J<EFBFBD> <14>A<EFBFBD>G<EFBFBD>G<EFBFBD><1F> <1B>
<EFBFBD>1<><02><1B><1A>.<2E>0<>1<><31>
s<00>B<04>B<04>
B<04>Brc<00>J<<03>RpSPFsp\V\4'dKVPSP9gK8VP
'dKLSPP VP4RpKu V'd.SnS!S!44R#)TFN)r#rDrrSrCrrr@)rm<00> all_selectedrTrErMr^s& <20><><EFBFBD>r<00>all<6C>checkbox.<locals>.allsv<00><><00><1B> <0C><13><1A><1A>A<EFBFBD><1E>q<EFBFBD>)<29>,<2C>,<2C><15>G<EFBFBD>G<EFBFBD>2<EFBFBD>#6<>#6<>6<><19>
<EFBFBD>
<EFBFBD>
<EFBFBD><13>#<23>#<23>*<2A>*<2A>1<EFBFBD>7<EFBFBD>7<EFBFBD>3<>$<24> <0C><1C> <18>"$<24>B<EFBFBD> <1F><1A>.<2E>0<>1rc<00>x<<01>SP4SP4'gSP4K(R#rR)<02> select_next<78>is_selection_valid<69>rfrMs&<26>r<00>move_cursor_down<77>"checkbox.<locals>.move_cursor_downs+<00><><00>
<EFBFBD><0E><0E><18><14>'<27>'<27>)<29>)<29> <0E>N<EFBFBD>N<EFBFBD> <1C>*rc<00>x<<01>SP4SP4'gSP4K(R#rR)<02>select_previousr|r}s&<26>r<00>move_cursor_up<75> checkbox.<locals>.move_cursor_ups/<00><><00>
<EFBFBD><1A><1A><1C><14>'<27>'<27>)<29>)<29> <0E> <1E> <1E> <20>*rc<00>`<<01>SPVP^,P4R#)rN)<03>add_search_character<65> key_sequence<63>keyr}s&<26>r<00> search_filter<65>checkbox.<locals>.search_filters"<00><><00> <0E> #<23> #<23>E<EFBFBD>$6<>$6<>q<EFBFBD>$9<>$=<3D>$=<3D> >r<00>j<>kc<00><><<03>S!4pRSnS!V4'd&RSnVPPVR7R#R#)T)<01>resultN)rYrArcrd)rfrWrErMr^s& <20><><EFBFBD>r<00>
set_answer<EFBFBD>checkbox.<locals>.set_answer3s<<00><><00>-<2D>/<2F><0F>"&<26><02><1F> <1D>o<EFBFBD> .<2E> .<2E>!<21>B<EFBFBD>N<EFBFBD> <11>I<EFBFBD>I<EFBFBD>N<EFBFBD>N<EFBFBD>/<2F>N<EFBFBD> 2<> /rc<04><00>R#)zDisallow inserting other text.Nr)rms&r<00>other<65>checkbox.<locals>.other<s<00>r<00>layout<75> key_bindingsr()zbottom-toolbar<61> noreverser)<1D>
ValueErrorrr<00>callablerr<00>create_inquirer_layoutr <00>addr<00>ControlQ<6C>ControlC<6C>ControlI<6C>ControlA<6C>string<6E> printable<6C>
whitespace<EFBFBD> Backspace<63>Down<77>Up<55>ControlN<6C>ControlP<6C>ControlMrrr r<00> used_kwargs<67>__init__) r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0<00> merged_stylerNr<><00>bindingsrgrortrxr~r<>r<><00> characterr<72>r<>rErMr^s f&&ff&&&&&&ff&, @@@r<00>checkboxr<78>s<00><><00>B <1B>k<EFBFBD>^<5E><18> <1A>
<EFBFBD>
<EFBFBD>
<13>(<28><18> a<>
<EFBFBD>
<EFBFBD>(<28>
<12>2<>3<> 4<> <11> 
<EFBFBD><06>L<EFBFBD> <14>H<EFBFBD> <1D> <1D><18>4<>5<>5<> <18><0F><0F><17>%<25>)<29> 
<06>B<EFBFBD>,<16>,<16>\;<3B>;<3B><15><15>$<14> *<2A> *<2A>2<EFBFBD>/@<40> K<>F<EFBFBD> K<>F<EFBFBD><1A>}<7D>H<EFBFBD> <0A>\<5C>\<5C>$<24>-<2D>-<2D>t<EFBFBD>\<5C>,<2C> <0A>\<5C>\<5C>$<24>-<2D>-<2D>t<EFBFBD>\<5C>,<2C>L<01>-<2D>-<2D>L<01><0E>\<5C>\<5C>#<23>T<EFBFBD>\<5C>"<22>2<>#<23>2<><0E>\<5C>\<5C>#4<>$<24>-<2D>-<2D>#<23>T<EFBFBD>\<5C>J<>
2<>K<01>
2<><0E>\<5C>\<5C>#4<>$<24>-<2D>-<2D>#<23>T<EFBFBD>\<5C>J<>2<>K<01>2<> <1D>
!<21>
<19> ?<3F> <20>)<29>)<29>I<EFBFBD><18>F<EFBFBD>-<2D>-<2D>-<2D><18> <14>L<EFBFBD>L<EFBFBD><19>$<24>L<EFBFBD> /<2F> <0A> ><3E>*<2A> <11> <0C> <0C>T<EFBFBD>^<5E>^<5E>4<EFBFBD> <0C>0<><1D>?<3F><15><10> <0C> <0C>T<EFBFBD>Y<EFBFBD>Y<EFBFBD>d<EFBFBD> <0C>+<2B>,<<3C>=<3D><10> <0C> <0C>T<EFBFBD>W<EFBFBD>W<EFBFBD>D<EFBFBD> <0C>)<29>.<2E>9<><12><10> <0C> <0C>S<EFBFBD><04> <0C>%<25>&6<>7<><10> <0C> <0C>S<EFBFBD><04> <0C>%<25>n<EFBFBD>5<><15><10> <0C> <0C>T<EFBFBD>]<5D>]<5D>$<24> <0C>/<2F>0@<40>A<><10> <0C> <0C>T<EFBFBD>]<5D>]<5D>$<24> <0C>/<2F><0E>?<3F> <0A>\<5C>\<5C>$<24>-<2D>-<2D>t<EFBFBD>\<5C>,<2C>3<>-<2D>3<><0E>\<5C>\<5C>$<24>(<28>(<28><1B>-<2D><1C>-<2D> <14><13>
<EFBFBD><19>
<EFBFBD>!<21>
<EFBFBD><1F>
<EFBFBD><14><1F><1F><06> <0B>(<<3C>(<<3C>=<3D> 
<EFBFBD> <06>r)%r<><00>typingrrrrrrr r
<00>prompt_toolkit.applicationr <00>prompt_toolkit.formatted_textr <00>prompt_toolkit.key_bindingr <00>prompt_toolkit.keysr<00>prompt_toolkit.stylesr<00> questionaryr<00>questionary.constantsrrr<00>questionary.promptsr<00>questionary.prompts.commonrrr<00>questionary.questionr<00>questionary.stylesrr<>rrr<00><module>r<>s<00><01> <0A><16><1B><17><17><1B><1B><18><18>2<>7<>2<>$<24>'<27><1D>9<>:<3A>/<2F>&<26>-<2D>6<>0<>)<29>3<> "<22>8F<38>(<28>5<>!<21>CG<43><1F><1C><1F>05<30>!%<25>!<21>j<06>jr