Files
proxmox/venv/lib/python3.12/site-packages/jinja2/__pycache__/tests.cpython-312.pyc

139 lines
8.8 KiB
Plaintext
Raw Normal View History

<EFBFBD>
<0E>Hi&<00><00><><00>dZddlZddlZddlmZddlmZddlm Z ddl
m Z ejrddl mZd ed
efd <0B>Zd ed
efd <0C>Zd ed ed
efd<0E>Zd ej(d
efd<0F>Zd ej(d
efd<10>Ze ddd ed
efd<13><04>Ze ddd ed
efd<14><04>Zd ej(d
efd<15>Zd ej(d
efd<16>Zd ej(d
efd<17>Zd ej(d
efd<18>Zd ej(d
efd<19>Zd ej(d
efd<1A>Zd ed
efd<1B>Z d ed
efd<1C>Z!d ej(d
efd<1D>Z"d ej(d
efd<1E>Z#d ej(d
efd<1F>Z$d ej(d
efd <20>Z%d ej(d!ej(d
efd"<22>Z&d ej(d
efd#<23>Z'd ej(d
efd$<24>Z(d ej(d%ejRej(d
efd&<26>Z*id'e<11>d(e<12>d)e<13>d*e<15>d+e<16>d,e<18>d-e<19>d.e<1A>d/e<1B>d0e<1C>d1e<1D>d2e<1E>d3e<1F>d4e <20>d5e!<21>d6e"<22>d7e#<23>id8e$<24>d9e%<25>d:e'<27>d;e+<2B>d<e&<26>d=e(<28>d>e*<2A>d?ejX<00>d@ejX<00>dAejX<00>dBejZ<00>dCejZ<00>dDej\<00>dEej\<00>dFej\<00>dGej^<00>dHej^<00><01>ej`ej`ej`ejbejbdI<64><05>Z2y)Jz6Built-in template tests used with the ``is`` operator.<2E>N)<01>abc)<01>Number<65>)<01> Undefined)<01>pass_environment)<01> Environment<6E>value<75>returnc<00><00>|dzdk(S)z#Return true if the variable is odd.<2E>r<00><00>r s <20>N/home/intlc/projects/proxmox/venv/lib/python3.12/site-packages/jinja2/tests.py<70>test_oddr<00><00><00> <10>1<EFBFBD>9<EFBFBD><01>><3E><19>c<00><00>|dzdk(S)z$Return true if the variable is even.r rr rs r<00> test_evenrrr<00>numc<00><00>||zdk(S)z-Check if a variable is divisible by a number.rr )r rs r<00>test_divisiblebyrs<00><00> <10>3<EFBFBD>;<3B>!<21> <1B>rc<00>$<00>t|t<00> S)a;Return true if the variable is defined:
.. sourcecode:: jinja
{% if variable is defined %}
value of variable: {{ variable }}
{% else %}
variable is not defined
{% endif %}
See the :func:`default` filter for a simple way to set undefined
variables.
<20><02>
isinstancerrs r<00> test_definedrs<00><00><1A>%<25><19>+<2B> +<2B>+rc<00>"<00>t|t<00>S)z-Like :func:`defined` but the other way round.rrs r<00>test_undefinedr/s<00><00> <15>e<EFBFBD>Y<EFBFBD> '<27>'r<00>envrc<00><00>||jvS)aCheck if a filter exists by name. Useful if a filter may be
optionally available.
.. code-block:: jinja
{% if 'markdown' is filter %}
{{ value | markdown }}
{% else %}
{{ value }}
{% endif %}
.. versionadded:: 3.0
)<01>filters<72>rr s r<00> test_filterr"4s<00><00> <11>C<EFBFBD>K<EFBFBD>K<EFBFBD> <1F>rc<00><00>||jvS)a<>Check if a test exists by name. Useful if a test may be
optionally available.
.. code-block:: jinja
{% if 'loud' is test %}
{% if value is loud %}
{{ value|upper }}
{% else %}
{{ value|lower }}
{% endif %}
{% else %}
{{ value }}
{% endif %}
.. versionadded:: 3.0
)<01>testsr!s r<00> test_testr%Fs<00><00>& <11>C<EFBFBD>I<EFBFBD>I<EFBFBD> <1D>rc<00>
<00>|duS)z$Return true if the variable is none.Nr rs r<00> test_noner'\s <00><00> <10>D<EFBFBD>=<3D>rc<00><00>|duxs|duS)zNReturn true if the object is a boolean value.
.. versionadded:: 2.11
TFr rs r<00> test_booleanr)as<00><00>
<11>D<EFBFBD>=<3D> *<2A>E<EFBFBD>U<EFBFBD>N<EFBFBD>*rc<00>
<00>|duS)zDReturn true if the object is False.
.. versionadded:: 2.11
Fr rs r<00>
test_falser+is<00><00>
<11>E<EFBFBD>><3E>rc<00>
<00>|duS)zCReturn true if the object is True.
.. versionadded:: 2.11
Tr rs r<00> test_truer-qs<00><00>
<11>D<EFBFBD>=<3D>rc<00>:<00>t|t<00>xr
|duxr|duS)zIReturn true if the object is an integer.
.. versionadded:: 2.11
TF)r<00>intrs r<00> test_integerr0zs%<00><00>
<16>e<EFBFBD>S<EFBFBD> !<21> N<>e<EFBFBD>4<EFBFBD>&7<> N<>E<EFBFBD><15><N<>Nrc<00>"<00>t|t<00>S)zFReturn true if the object is a float.
.. versionadded:: 2.11
)r<00>floatrs r<00>
test_floatr3<00>s<00><00>
<16>e<EFBFBD>U<EFBFBD> #<23>#rc<00>4<00>t|<00>j<00>S)z*Return true if the variable is lowercased.)<02>str<74>islowerrs r<00>
test_lowerr7<00><00><00><00> <0E>u<EFBFBD>:<3A> <1D> <1D> <1F>rc<00>4<00>t|<00>j<00>S)z*Return true if the variable is uppercased.)r5<00>isupperrs r<00>
test_upperr;<00>r8rc<00>"<00>t|t<00>S)z&Return true if the object is a string.)rr5rs r<00> test_stringr=<00>s<00><00> <15>e<EFBFBD>S<EFBFBD> !<21>!rc<00>6<00>t|tj<00>S)zSReturn true if the object is a mapping (dict etc.).
.. versionadded:: 2.6
)rr<00>Mappingrs r<00> test_mappingr@<00>s<00><00>
<16>e<EFBFBD>S<EFBFBD>[<5B>[<5B> )<29>)rc<00>"<00>t|t<00>S)z(Return true if the variable is a number.)rrrs r<00> test_numberrB<00>s<00><00> <15>e<EFBFBD>V<EFBFBD> $<24>$rc<00>R<00> t|<00>|jy#t$rYywxYw)z^Return true if the variable is a sequence. Sequences are variables
that are iterable.
FT)<03>len<65> __getitem__<5F> Exceptionrs r<00> test_sequencerG<00>s0<00><00><15> <0B>E<EFBFBD>
<EFBFBD> <0A><19><19> <10><> <15><15><14><15>s <00><00> &<03>&<03>otherc<00>
<00>||uS)z<>Check if an object points to the same memory address than another
object:
.. sourcecode:: jinja
{% if foo.attribute is sameas false %}
the foo attribute really is the `False` singleton
{% endif %}
r )r rHs r<00> test_sameasrJ<00>s<00><00> <11>E<EFBFBD>><3E>rc<00>:<00> t|<00>y#t$rYywxYw)z1Check if it's possible to iterate over an object.FT)<02>iter<65> TypeErrorrs r<00> test_iterablerN<00>s'<00><00><15> <0C>U<EFBFBD> <0B> <10><> <15><15><14><15>s <00> <00> <03>c<00><00>t|d<01>S)zCheck if the value is escaped.<2E>__html__)<01>hasattrrs r<00> test_escapedrR<00>s<00><00> <12>5<EFBFBD>*<2A> %<25>%r<00>seqc<00>
<00>||vS)z:Check if value is in seq.
.. versionadded:: 2.10
r )r rSs r<00>test_inrU<00>s<00><00>
<11>C<EFBFBD><<3C>r<00>odd<64>even<65> divisibleby<62>defined<65> undefined<65>filter<65>test<73>none<6E>boolean<61>false<73>true<75>integerr2<00>lower<65>upper<65>string<6E>mapping<6E>number<65>sequence<63>iterable<6C>callable<6C>sameas<61>escaped<65>inz==<3D>eq<65>equaltoz!=<3D>ne<6E>><3E>gt<67> greaterthan<61>gez>=)<05><<3C>lt<6C>lessthanz<=<3D>le)3<>__doc__<5F>operator<6F>typing<6E>t<> collectionsr<00>numbersr<00>runtimer<00>utilsr<00> TYPE_CHECKING<4E> environmentrr/<00>boolrrr<00>Anyrrr5r"r%r'r)r+r-r0r3r7r;r=r@rBrGrJrNrR<00> ContainerrUrirmrorqrsrurw<00>TESTSr rr<00><module>r<>sd<00><01><<3C><0F><12><1B><1A><1E>#<23><04>?<3F>?<3F>(<28><1A>C<EFBFBD><1A>D<EFBFBD><1A>
<1A>S<EFBFBD><1A>T<EFBFBD><1A>
<1C>C<EFBFBD><1C>c<EFBFBD><1C>d<EFBFBD><1C>
,<2C><01><05><05>,<2C>$<24>,<2C>"(<28>!<21>%<25>%<25>(<28>D<EFBFBD>(<28>
<12> <20>]<5D> <20>3<EFBFBD> <20>4<EFBFBD> <20><12> <20>"<12><1E>=<3D><1E><13><1E><14><1E><12><1E>*<19>Q<EFBFBD>U<EFBFBD>U<EFBFBD><19>t<EFBFBD><19>
+<2B><01><05><05>+<2B>$<24>+<2B><1A>a<EFBFBD>e<EFBFBD>e<EFBFBD><1A><04><1A><19>Q<EFBFBD>U<EFBFBD>U<EFBFBD><19>t<EFBFBD><19>O<01><01><05><05>O<01>$<24>O<01>$<24>a<EFBFBD>e<EFBFBD>e<EFBFBD>$<24><04>$<24> <20>c<EFBFBD> <20>d<EFBFBD> <20>
 <20>c<EFBFBD> <20>d<EFBFBD> <20>
"<22>q<EFBFBD>u<EFBFBD>u<EFBFBD>"<22><14>"<22>
*<2A><01><05><05>*<2A>$<24>*<2A>%<25>q<EFBFBD>u<EFBFBD>u<EFBFBD>%<25><14>%<25>
<10><11><15><15>
<10>4<EFBFBD>
<10>
<1A>q<EFBFBD>u<EFBFBD>u<EFBFBD>
<1A>Q<EFBFBD>U<EFBFBD>U<EFBFBD>
<1A>t<EFBFBD>
<1A><10><11><15><15><10>4<EFBFBD><10>&<26><01><05><05>&<26>$<24>&<26>
<18>1<EFBFBD>5<EFBFBD>5<EFBFBD><18>q<EFBFBD>{<7B>{<7B>1<EFBFBD>5<EFBFBD>5<EFBFBD>1<><18>d<EFBFBD><18>( <02> <09>8<EFBFBD>( <02>
<EFBFBD>I<EFBFBD>( <02><12>#<23>( <02><0E>|<7C> ( <02>
<10><1E> ( <02>  <0A>k<EFBFBD> ( <02> <0B>I<EFBFBD>( <02> <0B>I<EFBFBD>( <02><0E>|<7C>( <02> <0C>Z<EFBFBD>( <02> <0B>I<EFBFBD>( <02><0E>|<7C>( <02> <0C>Z<EFBFBD>( <02> <0C>Z<EFBFBD>( <02> <0C>Z<EFBFBD>( <02>  <0A>k<EFBFBD>!( <02>"<0E>|<7C>#( <02>$ <0A>k<EFBFBD>%( <02>&<0F> <0A>'( <02>(<0F> <0A>)( <02>*<0F><08>+( <02>, <0A>k<EFBFBD>-( <02>.<0E>|<7C>/( <02>0 <09>'<27>1( <02>2 <09>(<28>+<2B>+<2B>3( <02>4 <09>(<28>+<2B>+<2B>5( <02>6<0E>x<EFBFBD>{<7B>{<7B>7( <02>8 <09>(<28>+<2B>+<2B>9( <02>: <09>(<28>+<2B>+<2B>;( <02><<08><18><1B><1B>=( <02>> <09>(<28>+<2B>+<2B>?( <02>@<12>8<EFBFBD>;<3B>;<3B>A( <02>B <09>(<28>+<2B>+<2B>C( <02>D <09>(<28>+<2B>+<2B>E( <02>F
<12><1B><1B>
<12>+<2B>+<2B><18> <0B> <0B>
<12>+<2B>+<2B>
<12>+<2B>+<2B>O( <02>r