JFIF$        dd7 

Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/__pycache__/speaklater.cpython-311.pyc

�

�C�˷?���n�dZd�Zd�Zd�ZGd�de��ZedkrddlZej��dSdS)	a�
    speaklater
    ~~~~~~~~~~

    A module that provides lazy strings for translations.  Basically you
    get an object that appears to be a string but changes the value every
    time the value is evaluated based on a callable you provide.

    For example you can have a global `lazy_gettext` function that returns
    a lazy string with the value of the current set language.

    Example:

    >>> from speaklater import make_lazy_string
    >>> sval = u'Hello World'
    >>> string = make_lazy_string(lambda: sval)

    This lazy string will evaluate to the value of the `sval` variable.

    >>> string
    lu'Hello World'
    >>> unicode(string)
    u'Hello World'
    >>> string.upper()
    u'HELLO WORLD'

    If you change the value, the lazy string will change as well:

    >>> sval = u'Hallo Welt'
    >>> string.upper()
    u'HALLO WELT'

    This is especially handy when combined with a thread local and gettext
    translations or dicts of translatable strings:

    >>> from speaklater import make_lazy_gettext
    >>> from threading import local
    >>> l = local()
    >>> l.translations = {u'Yes': 'Ja'}
    >>> lazy_gettext = make_lazy_gettext(lambda: l.translations.get)
    >>> yes = lazy_gettext(u'Yes')
    >>> print yes
    Ja
    >>> l.translations[u'Yes'] = u'Si'
    >>> print yes
    Si

    Lazy strings are no real strings so if you pass this sort of string to
    a function that performs an instance check, it will fail.  In that case
    you have to explicitly convert it with `unicode` and/or `string` depending
    on what string type the lazy string encapsulates.

    To check if a string is lazy, you can use the `is_lazy_string` function:

    >>> from speaklater import is_lazy_string
    >>> is_lazy_string(u'yes')
    False
    >>> is_lazy_string(yes)
    True

    New in version 1.2: It's now also possible to pass keyword arguments to
    the callback used with `make_lazy_string`.

    :copyright: (c) 2010 by Armin Ronacher.
    :license: BSD, see LICENSE for more details.
c�,�t|t��S)z,Checks if the given object is a lazy string.)�
isinstance�_LazyString)�objs �j/builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/speaklater.py�is_lazy_stringrFs���c�;�'�'�'�c�$�t|||��S)z1Creates a lazy string by invoking func with args.)r)�__func�args�kwargss   r�make_lazy_stringr
Ks���v�t�V�,�,�,rc����fd�}|S)aPCreates a lazy gettext function dispatches to a gettext
    function as returned by `lookup_func`.

    Example:

    >>> translations = {u'Yes': u'Ja'}
    >>> lazy_gettext = make_lazy_gettext(lambda: translations.get)
    >>> x = lazy_gettext(u'Yes')
    >>> x
    lu'Ja'
    >>> translations[u'Yes'] = u'Si'
    >>> x
    lu'Si'
    c�V��t|��r|St���|��S�N)rr
)�string�lookup_funcs �r�lazy_gettextz'make_lazy_gettext.<locals>.lazy_gettext_s.����&�!�!�	��M����
�
�v�6�6�6r�)rrs` r�make_lazy_gettextrPs$���7�7�7�7�7��rc���eZdZdZdZd�Zed���Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z dS)rz�Class for strings created by a function call.

    The proxy implementation attempts to be as complete as possible, so that
    the lazy objects should mostly work as expected, for example for sorting.
    ��_func�_args�_kwargsc�0�||_||_||_dSrr)�self�funcrrs    r�__init__z_LazyString.__init__ns����
���
�����rc�0�|j|ji|j��Srr)�xs r�<lambda>z_LazyString.<lambda>ss��w�q�w���=�1�9�=�=�rc��||jvSr��value�r�keys  r�__contains__z_LazyString.__contains__us���d�j� � rc�*�t|j��Sr)�boolr$�rs r�__nonzero__z_LazyString.__nonzero__x����D�J���rc�*�tt��Sr)�dir�unicoder*s r�__dir__z_LazyString.__dir__{s���7�|�|�rc�*�t|j��Sr)�iterr$r*s r�__iter__z_LazyString.__iter__~r,rc�*�t|j��Sr)�lenr$r*s r�__len__z_LazyString.__len__�����4�:���rc�*�t|j��Sr)�strr$r*s r�__str__z_LazyString.__str__�r7rc�*�t|j��Sr)r/r$r*s r�__unicode__z_LazyString.__unicode__�s���t�z�"�"�"rc��|j|zSrr#�r�others  r�__add__z_LazyString.__add__�����z�E�!�!rc��||jzSrr#r>s  r�__radd__z_LazyString.__radd__�����t�z�!�!rc��|j|zSrr#r>s  r�__mod__z_LazyString.__mod__�rArc��||jzSrr#r>s  r�__rmod__z_LazyString.__rmod__�rDrc��|j|zSrr#r>s  r�__mul__z_LazyString.__mul__�rArc��||jzSrr#r>s  r�__rmul__z_LazyString.__rmul__�rDrc��|j|kSrr#r>s  r�__lt__z_LazyString.__lt__�����z�E�!�!rc��|j|kSrr#r>s  r�__le__z_LazyString.__le__�����z�U�"�"rc��|j|kSrr#r>s  r�__eq__z_LazyString.__eq__�rRrc��|j|kSrr#r>s  r�__ne__z_LazyString.__ne__�rRrc��|j|kSrr#r>s  r�__gt__z_LazyString.__gt__�rOrc��|j|kSrr#r>s  r�__ge__z_LazyString.__ge__�rRrc�`�|dkr|���St|j|��S)N�__members__)r0�getattrr$)r�names  r�__getattr__z_LazyString.__getattr__�s-���=� � ��<�<�>�>�!��t�z�4�(�(�(rc�*�|j|j|jfSrrr*s r�__getstate__z_LazyString.__getstate__�s���z�4�:�t�|�3�3rc�0�|\|_|_|_dSrr)r�tups  r�__setstate__z_LazyString.__setstate__�s��/2�,��
�D�J����rc��|j|Srr#r%s  r�__getitem__z_LazyString.__getitem__�s���z�#��rc��|Srrr*s r�__copy__z_LazyString.__copy__�s���rc�p�	dt|j��zS#t$rd|jjzcYSwxYw)N�lz<%s broken>)�reprr$�	Exception�	__class__�__name__r*s r�__repr__z_LazyString.__repr__�sM��	;���d�j�)�)�)�)���	;�	;�	;� �4�>�#:�:�:�:�:�	;���s��5�5N)!rn�
__module__�__qualname__�__doc__�	__slots__r�propertyr$r'r+r0r3r6r:r<r@rCrFrHrJrLrNrQrTrVrXrZr_rardrfrhrorrrrrfs���������
.�I����

�H�=�=�>�>�E�!�!�!� � � ���� � � �������#�#�#�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�#�#�#�#�#�#�#�#�#�"�"�"�#�#�#�)�)�)�
4�4�4�3�3�3�������;�;�;�;�;rr�__main__�N)	rrrr
r�objectrrn�doctest�testmodrrr�<module>rzs���A�A�H(�(�(�
-�-�-�
���,];�];�];�];�];�&�];�];�];�@�z����N�N�N��G�O�������r
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?CIuI|֓>^ExLgNUY+{.RѪ τV׸YTD I62'8Y27'\TP.6d&˦@Vqi|8-OΕ]ʔ U=TL8=;6c| !qfF3aů&~$l}'NWUs$Uk^SV:U# 6w++s&r+nڐ{@29 gL u"TÙM=6(^"7r}=6YݾlCuhquympǦ GjhsǜNlɻ}o7#S6aw4!OSrD57%|?x>L |/nD6?/8w#[)L7+6〼T ATg!%5MmZ/c-{1_Je"|^$'O&ޱմTrb$w)R$& N1EtdU3Uȉ1pM"N*(DNyd96.(jQ)X 5cQɎMyW?Q*!R>6=7)Xj5`J]e8%t!+'!1Q5 !1 AQaqё#2"0BRb?Gt^## .llQT $v,,m㵜5ubV =sY+@d{N! dnO<.-B;_wJt6;QJd.Qc%p{ 1,sNDdFHI0ГoXшe黅XۢF:)[FGXƹ/w_cMeD,ʡcc.WDtA$j@:) -# u c1<@ۗ9F)KJ-hpP]_x[qBlbpʖw q"LFGdƶ*s+ډ_Zc"?%t[IP 6J]#=ɺVvvCGsGh1 >)6|ey?Lӣm,4GWUi`]uJVoVDG< SB6ϏQ@ TiUlyOU0kfV~~}SZ@*WUUi##; s/[=!7}"WN]'(L! ~y5g9T̅JkbM' +s:S +B)v@Mj e Cf jE 0Y\QnzG1д~Wo{T9?`Rmyhsy3!HAD]mc1~2LSu7xT;j$`}4->L#vzŏILS ֭T{rjGKC;bpU=-`BsK.SFw4Mq]ZdHS0)tLg