%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib/python2.7/site-packages/jsonschema/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyo

�
���Xc@sIddlmZmZddlZddlZddlZddlmZddlm	Z	m
Z
eddg�Ze�Z
ej�Zdefd��YZd	efd
��YZdefd��YZd
efd��YZdefd��YZdefd��YZdefd��YZee
d�Ze�Zed�ZdS(i����(tdefaultdicttdequeN(t_utils(tPY3t	iteritemstanyOftoneOft_Errorc
Bs�eZed	d
deeedd
d�	Zd�Zd�ZerKeZn	d�Ze	d��Z
ed��Zed��Z
d�Zd�ZRS(
cCs�tt|�j|||||||||	|
�
||_t|�|_|_t|	�|_|_t	|�|_
||_|_||_
||_||_||_|
|_x|D]}||_q�WdS(N(tsuperRt__init__tmessageRtpatht
relative_pathtschema_pathtrelative_schema_pathtlisttcontexttcauset	__cause__t	validatortvalidator_valuetinstancetschematparent(tselfR
RRRRRRRR
Rterror((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR	s.
						
cCsd|jj|jfS(Ns<%s: %r>(t	__class__t__name__R
(R((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt__repr__8scCs�|j|j|j|jf}td�|D��r;|jStj|jdd�}tj|jdd�}|jtj	dj
��|jtjt
|j�d �tj|�tj|j�tj|�fS(Ncss|]}|tkVqdS(N(t_unset(t.0tm((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pys	<genexpr>?stwidthiHsv

            Failed validating %r in schema%s:
            %s

            On instance%s:
            %s
            i����(RRRRtanyR
tpprinttpformatttextwraptdedenttrstripRtformat_as_indexRRtindentR(Rtessential_for_verbosetpschemat	pinstance((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt__unicode__;scCst|�jd�S(Nsutf-8(tunicodetencode(R((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt__str__WscCs||j��S(N(t	_contents(tclstother((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pytcreate_fromZscCsE|j}|dkr|jSt|j�}|jt|j��|S(N(RtNoneRRt
extendlefttreversedt
absolute_path(RRR((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR7^s	cCsE|j}|dkr|jSt|j�}|jt|j��|S(N(RR4RRR5R6tabsolute_schema_path(RRR((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR8hs	cKsIxBt|�D]4\}}t||�tkr
t|||�q
q
WdS(N(RtgetattrRtsetattr(Rtkwargstktv((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt_setrsc
s d}t�fd�|D��S(
NR
RRRRRR
RRRc3s$|]}|t�|�fVqdS(N(R9(Rtattr(R(sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pys	<genexpr>|s(
R
RRRRRR
RRR(tdict(Rtattrs((RsF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR0ws(N(((Rt
__module__RR4R	RR,RR/tclassmethodR3tpropertyR7R8R>R0(((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyRs&				

	tValidationErrorcBseZRS((RRB(((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyREstSchemaErrorcBseZRS((RRB(((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyRF�stRefResolutionErrorcBseZRS((RRB(((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyRG�stUnknownTypecBs2eZd�Zd�Zer'eZn	d�ZRS(cCs||_||_||_dS(N(ttypeRR(RRIRR((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR	�s		cCsetj|jdd�}tj|jdd�}tjdj��|jtj	|�tj	|�fS(NR iHs�
            Unknown type %r for validator with schema:
            %s

            While checking instance:
            %s
            (
R"R#RRR$R%R&RIRR((RR*R+((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR,�s
cCst|�jd�S(Nsutf-8(R-R.(R((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR/�s(RRBR	R,RR/(((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyRH�s
			tFormatErrorcBs5eZdd�Zd�Zer*eZn	d�ZRS(cCs6tt|�j||�||_||_|_dS(N(RRJR	R
RR(RR
R((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR	�s	cCs|jS(N(R
(R((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR,�scCs|jjd�S(Nsutf-8(R
R.(R((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR/�sN(RRBR4R	R,RR/(((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyRJ�s
		t	ErrorTreecBseeZdZeZd	d�Zd�Zd�Zd�Zd�Z	d�Z
d�Zed��Z
RS(
sG
    ErrorTrees make it easier to check which validations failed.

    cCspi|_t|j�|_xN|D]F}|}x|jD]}||}q8W||j|j<|j|_q"WdS(N(terrorsRRR0RRRt	_instance(RRLRt	containertelement((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR	�s	
cCs
||jkS(sD
        Check whether ``instance[index]`` has any errors.

        (R0(Rtindex((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt__contains__�scCs4|jtk	r)||kr)|j|n|j|S(sY
        Retrieve the child tree one level down at the given ``index``.

        If the index is not in the instance that this tree corresponds to and
        is not known by this tree, whatever error would be raised by
        ``instance.__getitem__`` will be propagated (usually this is some
        subclass of :class:`LookupError`.

        (RMRR0(RRP((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt__getitem__�scCs||j|<dS(N(R0(RRPtvalue((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt__setitem__�scCs
t|j�S(sZ
        Iterate (non-recursively) over the indices in the instance with errors.

        (titerR0(R((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt__iter__�scCs|jS(s0
        Same as :attr:`total_errors`.

        (ttotal_errors(R((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt__len__�scCsd|jjt|�fS(Ns<%s (%s total errors)>(RRtlen(R((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyR�scCs0td�t|j�D��}t|j�|S(sU
        The total number of errors in the entire tree, including children.

        css!|]\}}t|�VqdS(N(RY(Rt_ttree((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pys	<genexpr>�s(tsumRR0RYRL(Rtchild_errors((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyRW�s((RRBt__doc__RRMR	RQRRRTRVRXRRDRW(((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyRK�s						cs��fd�}|S(Ncs,|j}t|j�|�k|�kfS(N(RRYR(RR(tstrongtweak(sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt	relevances	((R`R_Ra((R_R`sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pytby_relevancescCsut|�}t|d�}|dkr+dSttj|g|�d|�}x"|jrpt|jd|�}qOW|S(Ntkey(RUtnextR4tmaxt	itertoolstchainRtmin(RLRctbest((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt
best_match
s!(tcollectionsRRRfR"R$t
jsonschemaRtjsonschema.compatRRt	frozensettWEAK_MATCHEStSTRONG_MATCHEStUnsetRt	ExceptionRRERFRGRHRJtobjectRKRbRaRj(((sF/opt/alt/python27/lib/python2.7/site-packages/jsonschema/exceptions.pyt<module>s$	oL	

Zerion Mini Shell 1.0