403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/reportlab/lib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/reportlab/lib/__pycache__/attrmap.cpython-311.pyc
�

}G�b����dZdZddlmZmZddlmZddlmZGd�d��Z	Gd�d	��Z
Gd
�de��Zd�Z
dd
�Zd�Zd�Zdd�ZdS)z3.3.0a�Framework for objects whose assignments are checked. Used by graphics.

We developed reportlab/graphics prior to Python 2 and metaclasses. For the
graphics, we wanted to be able to declare the attributes of a class, check
them on assignment, and convert from string arguments.  Examples of
attrmap-based objects can be found in reportlab/graphics/shapes.  It lets
us defined structures like the one below, which are seen more modern form in
Django models and other frameworks.

We'll probably replace this one day soon, hopefully with no impact on client
code.

class Rect(SolidShape):
    """Rectangle, possibly with rounded corners."""

    _attrMap = AttrMap(BASE=SolidShape,
        x = AttrMapValue(isNumber),
        y = AttrMapValue(isNumber),
        width = AttrMapValue(isNumber),
        height = AttrMapValue(isNumber),
        rx = AttrMapValue(isNumber),
        ry = AttrMapValue(isNumber),
        )


�)�
isAnything�DerivedValue)�isSeq)�	rl_configc��eZdZdZd�Zd�ZdS)�
CallableValuez(a class to allow callable initial valuesc�0�||_||_||_dS�N��func�args�kw)�selfrr
rs    �7/usr/lib/python3/dist-packages/reportlab/lib/attrmap.py�__init__zCallableValue.__init__%s����	���	������c�0�|j|ji|j��Sr
r�rs r�__call__zCallableValue.__call__+s���t�y�$�)�.�d�g�.�.�.rN)�__name__�
__module__�__qualname__�__doc__rr�rrrr#s8������2�2����/�/�/�/�/rrc�&�eZdZdZdd�Zd�Zd�ZdS)�AttrMapValuez,Simple multi-value holder for attribute mapsNrc��|pt|_||_||_||_|���D]\}}t
|||���dSr
)r�validate�desc�_initial�_advancedUsage�items�setattr)rrr�initial�
advancedUsager�k�vs        rrzAttrMapValue.__init__0s^�� �.�J��
���	���
�+����8�8�:�:�	�	�C�A�a��D��1�����	�	rc��|dkr5t|jt��r|���S|jS|dkrdSt|���)Nr$�hiddenr)�
isinstancer r�AttributeError)r�names  r�__getattr__zAttrMapValue.__getattr__8sN����?�?��$�-�
�6�6�N�t�}�}���8N��=� �
�8�^�^��1��T�"�"�"rc�t�dd�d�|j���D����zS)NzAttrMapValue(%s)z, c��g|]}d|z��S)z%s=%rr)�.0�is  r�
<listcomp>z)AttrMapValue.__repr__.<locals>.<listcomp>Bs��.Z�.Z�.Z�q�w��{�.Z�.Z�.Zr)�join�__dict__r"rs r�__repr__zAttrMapValue.__repr__As6��!�D�I�I�.Z�.Z�D�M�DW�DW�DY�DY�.Z�.Z�.Z�$[�$[�[�[r)NNNr)rrrrrr-r5rrrrr.sQ������6�6�����#�#�#�\�\�\�\�\rrc�*�eZdZdgfd�Zd�Zgfd�ZdS)�AttrMapNc��i}|rzt|t��r|}nbt|��s|f}|D]M}t|d|��}||ur|r|�|���/tdt
|��z���t�||��|�	|��|�|��dS)N�_attrMapzBASE=%s has wrong kind of value)
r*r7r�getattr�update�
ValueError�ascii�dictr�remove)r�BASE�UNWANTEDr�data�B�ams       rrzAttrMap.__init__Es������
	W��$�w�'�'�	
W�����T�{�{�2�D�7�D��W�W�A� ��:�d�3�3�B���~�~��.�t�{�{�2�����(�)J�U�ST�X�X�)U�V�V�V��
�
�d�4� � � ����H�������B�����rc�8�|D]}	||=�#t$rY�wxYwdSr
)�KeyError)r�unwantedr&s   rr?zAttrMap.removeWsI���	�	�A�
���G�G���
�
�
���
����	�	s�
�
�c�R�t||���}|�|��|S)N)r@rA)r7r;)rrAr�cs    r�clonez
AttrMap.clone^s(����x�0�0�0��	��������r)rrrrr?rJrrrr7r7DsU������������$���������rr7c�z�tjr�|j}|r�|ddkrt|t��rni	||j}||��s"t
d|�d|�d|jj�����n-#t$r t
d|�d|jj�����wxYwt|j|d��}t|t��r*	|�||��dS#t$rYdSwxYw|dkr5|j
���|j
�|��dS||j
|<dS)	z validate setattr(obj,name,value)r�_zIllegal assignment of 'z' to 'z' in class zIllegal attribute 'Nr4)r�
shapeCheckingr9r*rrr+�	__class__rrFr:�property�__set__r4�clearr;)�objr,�value�mapr�props      r�validateSetattrrVcs�����p��l���	p�4��7�S�=�=��%��.�.�	
p��p�"�4�y�1�H�#�8�E�?�?�G�,�n�af�af�af�hl�hl�hl�nq�n{�oE�oE�.F�G�G�G�G���p�p�p�(�.�QU�QU�QU�WZ�Wd�Wm�Wm�)n�o�o�o�p�����3�=��d�+�+�D��$�x� � �	#�	��L�L��U�#�#�#�#�#���	�	�	��D�D�	����	
�z�	�	������������E�"�"�"�"�"�"���T���s�:A4�4*B�
C%�%
C3�2C3c��|j}t|jdd��}|r||ur|���|fS|dfS||ur|���|_dSdS)zclone obj._attrMap if requiredr9N)r9r:rNrJ)rR�ret�A�oAs    r�_privateAttrMapr[�sk����A�	���z�$�	/�	/�B�
�%�
��7�7��7�7�9�9�b�=� ��d�7�N�
��7�7��7�7�9�9�C�L�L�L��7rc��|�d��}t|��dkrdS|dd�D]}t||��}�||dfS)zPLocate the object src.P for P a string, return parent and name of attribute
    �.r)NN���)�split�lenr:)�src�P�ps   r�_findObjectAndAttrrd�s[��	
������A�
�1�v�v��{�{��z��1�R�4��	"�	"�A��#�q�/�/�C�C��A�b�E�z�rc
���t|d��sR|j}ddl}|�|j|f|jzgt
|dd��tfd�d���|_dSdS)N�
__attrproxy__r�__setattr__c��|||||��Sr
r)rr&r'�osa�hooks     r�<lambda>z!hook__setattr__.<locals>.<lambda>�s��Y]�Y]�^b�cd�ef�gj�Yk�Yk�r)rfrg)�hasattrrN�new�classobjr�	__bases__r:rj)rR�Crms   r�hook__setattr__rq�s����3��'�'�n��M���
�
�
��l�l�1�:�q�d�1�;�.>��.5�c�-��.M�.M�SW�k�k�k�
m�
m�n�n��
�
�
�n�nrNc�$�t|d��s
Jd���t|d��\}}t|��s|f}g}g}	|D]I}
t|
��r|
d|
dd�}}
t||
��\}}
|rt	|dd��}�JdS)z>
    Add a proxy attribute 'name' to src with targets dst
    r9zsrc object has no _attrMap�rN)rlr[rrdr:)rar,rrr$�dstrYrZ�D�DV�d�erR�attr�dAs               r�addProxyAttributer{�s���
�3�z�"�"�@�@�$@�@�@�@��C��"�"�E�A�r���:�:�!�S�T�s�
�A�	�B�
�.�.����8�8�	��Q�4��1�2�2��q�A�&�s�1�-�-�	��T��	.���Z��-�-�B��.�.r)r)NNNN)�__version__r�reportlab.lib.validatorsrr�reportlab.lib.utilsr�	reportlabrrrr>r7rVr[rdrqr{rrr�<module>r�s5��
��	��4>�=�=�=�=�=�=�=�%�%�%�%�%�%�������	/�	/�	/�	/�	/�	/�	/�	/�\�\�\�\�\�\�\�\�,�����d����>#�#�#�:%�%�%�%�	�	�	�n�n�n�.�.�.�.�.�.r

Youez - 2016 - github.com/yon3zu
LinuXploit