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

116 lines
10 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
9<><39>i|<00> <00>N<00>^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^R I H
t
^R
I H t ^R I H t ^R I Ht^R IHt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt^RIHt!RR] 4t R]RRRR]PBRR3 RRllt"R#)<1D>)<01>Any)<01>Callable)<01>Dict)<01>Iterable)<01>List)<01>Optional)<01>Tuple)<01>Union)<01> CompleteEvent)<01> Completer)<01>
Completion)<01>Document)<01>HTML)<01> SimpleLexer)<01> CompleteStyle)<01> PromptSession)<01>Style)<01>DEFAULT_QUESTION_PREFIX)<01>build_validator)<01>Question)<01>merge_styles_defaultc<00><>a<00>]tRt^toRV3RlRlltV3RlRltV3RlRlt]V3RlR l4tV3R
lR lt V3R lt
R t Vt R#)<0F> WordCompleterNc
<00><><<01>V^8<>dQhRS[S[S[,S[.S[S[,3,3,RS[RS[S[S[S[3,,RS[RR/#)<07><00>choices<65> ignore_case<73>meta_information<6F> match_middle<6C>returnN)r
r<00>strr<00>boolrrr)<02>format<61> __classdict__s"<22><>G/tmp/pip-target-wqrk2shd/lib/python/questionary/prompts/autocomplete.py<70> __annotate__<5F>WordCompleter.__annotate__ se<00><><00>
)<29>
)<29><16>t<EFBFBD>C<EFBFBD>y<EFBFBD>(<28>2<EFBFBD>t<EFBFBD>C<EFBFBD>y<EFBFBD>=<3D>"9<>9<>:<3A>
)<29><1A>
)<29>#<23>4<EFBFBD><03>S<EFBFBD><08>><3E>2<>
)<29>
<1B>
)<29>
<0E>
)<29>c<08>L<00>WnW nT;'g/VnW@nR#<00>N)<04>choices_sourcerrr)<05>selfrrrrs&&&&&r%<00>__init__<5F>WordCompleter.__init__ s&<00><00>&<26><1B>&<26><18> 0<> 6<> 6<>B<EFBFBD><04><1D>(<28>r(c<00>0<<01>V^8<>dQhRS[S[,/#<00>rr )rr!)r#r$s"<22>r%r&r',s<00><><00>
<EFBFBD>
<EFBFBD>(<28>3<EFBFBD>-<2D>
r(c<08>p<00>\VP4'dVP4#VP#r*)<02>callabler+)r,s&r%<00>_choices<65>WordCompleter._choices,s8<00><00><18><04>+<2B>+<2B>,<2C>,<2C> <11> <1F> <1F> !<21>
<EFBFBD><16>$<24>$<24>
r(c<00>,<<01>V^8<>dQhRS[RS[RS[/#)r<00>word_before_cursor<6F>choicer )r!<00>int)r#r$s"<22>r%r&r'3s"<00><><00> <16> <16>#<23> <16>s<EFBFBD> <16>s<EFBFBD> r(c <0C><><00>VP'dVP4pVP'dVPV4#VP V4'd^#R#)z Match index if found, -1 if not.<2E><><EFBFBD><EFBFBD><EFBFBD>)r<00>lowerr<00>find<6E>
startswith)r,r6r7s&&&r%<00>_choice_matches<65>WordCompleter._choice_matches3sQ<00><00> <10> <1B> <1B> <1B><1B>\<5C>\<5C>^<5E>F<EFBFBD> <0F> <1C> <1C> <1C><19>;<3B>;<3B>1<>2<> 2<> <13> <1E> <1E>1<> 2<> 2<><14><15>Ir(c<00>2<<01>V^8<>dQhRS[RS[RS[RS[/#)rr7<00>indexr6r )r!r8r)r#r$s"<22>r%r&r'As*<00><><00>
<EFBFBD>
<EFBFBD>C<EFBFBD>
<EFBFBD><03>
<EFBFBD><13>
<EFBFBD>QU<EFBFBD>
r(c <08><><00>\R4PVRVWV\V4,W\V4,\V44#)z{}<b><u>{}</u></b>{}N)rr#<00>len)r7rAr6s&&&r%<00>_display_for_choice<63>!WordCompleter._display_for_choice@sN<00><00><13>*<2A>+<2B>2<>2<> <12>6<EFBFBD>E<EFBFBD>N<EFBFBD> <12>5<EFBFBD>3<EFBFBD>'9<>#:<3A>:<3A> ;<3B> <12>3<EFBFBD>1<>2<>2<>S<EFBFBD><16>[<5B> A<>
<EFBFBD>
r(c<00><<<01>V^8<>dQhRS[RS[RS[S[,/#)r<00>document<6E>complete_eventr )rr rr )r#r$s"<22>r%r&r'Hs*<00><><00><0E><0E> <20><0E>2?<3F><0E> <11>*<2A> <1D>r(c
#<08>z"<00>VP4pVPpVP'dVP4pVFrpVP WE4pVR8XdKVP
P VR4pVPWVV4p\V\V4)VPVRRR7x<00>Kt R#5i)<07><00><00> class:answerzclass:selected)<05>start_position<6F>display<61> display_meta<74>style<6C>selected_styleNr:) r3<00>text_before_cursorrr;r>r<00>getrDr rC<00>formatted_text) r,rGrHrr6r7rArOrNs &&& r%<00>get_completions<6E>WordCompleter.get_completionsHs<><00><00><00><17>-<2D>-<2D>/<2F><07>&<26>8<>8<><1A> <0F> <1B> <1B> <1B>!3<>!9<>!9<>!;<3B> <1E><1D>F<EFBFBD><18>(<28>(<28>);<3B>D<>E<EFBFBD><14><02>{<7B><18><1F>0<>0<>4<>4<>V<EFBFBD>R<EFBFBD>@<40>L<EFBFBD><1A>.<2E>.<2E>v<EFBFBD>>P<>Q<>G<EFBFBD><1C><16> #<23>F<EFBFBD> <0B>|<7C><1F>.<2E>.<2E>)<29>$<24>/<2F> <0E> <0E><1E>s<00>B9B;c<00><><<01>V^8<>dQh/S[S[S[,S[.S[S[,3,3,;R&S[;R&S[S[S[3,;R&S[;R&#)rr+rrr)r
rr!rr"rr)r#r$s"<22>r%r&r'sX<00><><00><00><19>$<24>s<EFBFBD>)<29>X<EFBFBD>b<EFBFBD>$<24>s<EFBFBD>)<29>m<EFBFBD>%<<3C><<3C>=<3D>=<3D><01><15><15><01><1B>3<EFBFBD><03>8<EFBFBD>n<EFBFBD>$<24><01><17><16> r()r+rrr)TNT) <0A>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__r-r3r><00> staticmethodrDrU<00>__annotate_func__<5F>__static_attributes__<5F>__classdictcell__)r$s@r%rrsI<00><><00><00>
)<29>
)<29>
<EFBFBD>
<EFBFBD> <16> <16><12>
<EFBFBD><12>
<EFBFBD><0E><0E>]<01>r(rrKNTc<00>.<00>V^8<>dQhR\R\\,R\R\R\\,R\\\\
3,,R\ R\ R \R
\
R \\,R \
R \/ #)r<00>messager<00>default<6C>qmark<72> completerrrr<00>complete_style<6C>validaterP<00>kwargsr )
r!rrr rrr"rrr)r#s"r%r&r&fs<><00><00>p<1B>p<1B> <10>p<1B> <11>#<23>Y<EFBFBD>p<1B><11>p<1B> <0F> p<1B>
<18> <09>"<22> p<1B> <1F>t<EFBFBD>C<EFBFBD><13>H<EFBFBD>~<7E>.<2E> p<1B><16>p<1B><17>p<1B>"<22>p<1B><12>p<1B> <14>E<EFBFBD>?<3F>p<1B><12>p<1B><0E>pr(c <04>\aa<03>\V
.4p RVV3Rllp RRlp\V 4pVf)V'g \R4h\VVV!V4VR7p\ V 3R\ R4R V R
VR VR V/V BpVP P\V44\VP4#) azPrompt the user to enter a message with autocomplete help.
Example:
>>> import questionary
>>> questionary.autocomplete(
... 'Choose ant species',
... choices=[
... 'Camponotus pennsylvanicus',
... 'Linepithema humile',
... 'Eciton burchellii',
... "Atta colombica",
... 'Polyergus lucidus',
... 'Polyergus rufescens',
... ]).ask()
? Choose ant species Atta colombica
'Atta colombica'
.. image:: ../images/autocomplete.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 contains items as strings
default: Default return value (single value).
qmark: Question prefix displayed in front of the question.
By default this is a ``?``
completer: A prompt_toolkit :class:`prompt_toolkit.completion.Completion`
implementation. If not set, a questionary completer implementation
will be used.
meta_information: A dictionary with information/anything about choices.
ignore_case: If true autocomplete would ignore case.
match_middle: If true autocomplete would search in every string position
not only in string begin.
complete_style: How autocomplete menu would be shown, it could be ``COLUMN``
``MULTI_COLUMN`` or ``READLINE_LIKE`` from
:class:`prompt_toolkit.shortcuts.CompleteStyle`.
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 can either be a function accepting the input and
returning a boolean, or an class reference to a
subclass of the prompt toolkit Validator class.
style: A custom color and style for the question parts. You can
configure colors as well as font types for different elements.
Returns:
:class:`Question`: Question instance, ready to be prompted (using ``.ask()``).
c<00>\<00>V^8<>dQhR\\\\3,,/#r0)rr r!)r#s"r%r&<00>"autocomplete.<locals>.__annotate__<5F>s#<00><00>T<01>T<01>t<EFBFBD>E<EFBFBD>#<23>s<EFBFBD>(<28>O<EFBFBD>4<>Tr(c<00>2<<02>RS3RRPS43.#)z class:qmarkzclass:questionz {} )r#)rarcs<00><>r%<00>get_prompt_tokens<6E>'autocomplete.<locals>.get_prompt_tokens<6E>s"<00><><00><1E><05>&<26>)9<>6<EFBFBD>=<3D>=<3D><17>;Q<>(R<>S<>Sr(c<00><><00>V^8<>dQhR\\\\3,,R\\\\3,,/#)r<00>metar )rrr!r)r#s"r%r&rj<00>s4<00><00><14><14>X<EFBFBD>d<EFBFBD>3<EFBFBD><03>8<EFBFBD>n<EFBFBD>5<><14>(<28>4<EFBFBD><03>S<EFBFBD><08>><3E>:R<>r(c<00>l<00>V'd,VF%p\R4PW,4W&K' V#)z<text>{}</text>)rr#)ro<00>keys& r%<00>get_meta_style<6C>$autocomplete.<locals>.get_meta_style<6C>s0<00><00> <0F><1B><03> <20>!2<>3<>:<3A>:<3A>4<EFBFBD>9<EFBFBD>E<><04> <09><1C><14> r(z2No choices is given, you should use Text question.)rrr<00>lexerrLrPrd<00> validatorre) rr<00>
ValueErrorrrr<00>default_buffer<65>resetrr<00>app)rarrbrcrdrrrrerfrPrg<00> merged_stylerlrrru<00>psf&&f&&&&&&&, r%<00> autocompleter|fs<><00><><00>X(<28><15><07>0<>L<EFBFBD>T<01>T<01><14> <20><08>)<29>I<EFBFBD><10><18><16><1C>Q<>R<> R<>!<21> <13>#<23>+<2B>,<<3C>=<3D>%<25> 
<EFBFBD> <09>%<25><19><06><19>.<2E>)<29><06><1B><06><1C> <06>
<1C> <06> &<26> <06> <11><06>A<EFBFBD><06><14><14><1A><1A>8<EFBFBD>G<EFBFBD>,<2C>-<2D> <13>A<EFBFBD>E<EFBFBD>E<EFBFBD>?<3F>r()#<23>typingrrrrrrr r
<00>prompt_toolkit.completionr r r <00>prompt_toolkit.documentr<00>prompt_toolkit.formatted_textr<00>prompt_toolkit.lexersr<00>prompt_toolkit.shortcuts.promptrr<00>prompt_toolkit.stylesr<00>questionary.constantsr<00>questionary.prompts.commonr<00>questionary.questionr<00>questionary.stylesrr<00>COLUMNr|<00>r(r%<00><module>r<>s<><00><01><16><1B><17><1B><17><1B><18><18>3<>/<2F>0<>,<2C>.<2E>-<2D>9<>9<>'<27>9<>6<>)<29>3<>I<0E>I<EFBFBD>I<0E>^<16>(<28>%)<29>15<31><1C><1D>$1<>$8<>$8<><18>!<21>p<1B>pr(