/usr/lib/python2.6/site-packages/jsonschema
Edit: /usr/lib/python2.6/site-packages/jsonschema/_validators.pyc (12960B)
Ñò
DVc @ sT d d k Z d d k l Z d d k l Z l Z d d k l Z d „ Z d „ Z d „ Z
d „ Z d „ Z d
„ Z
d „ Z d „ Z d
„ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z! d „ Z" d „ Z# d! „ Z$ d" „ Z% d S(# iÿÿÿÿN( t _utils( t FormatErrort ValidationError( t iteritemsc c s› | i | d ƒ p d Sx| t | ƒ D]n \ } } x_ t | ƒ D]Q \ } } t i | | ƒ o2 x/ | i | | d | d | ƒD] } | Vq| Wq> q> Wq% Wd S( Nt objectt patht schema_path( t is_typeR t ret searcht descend( t validatort patternPropertiest instancet schemat patternt subschemat kt vt error( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyR s
c c s¹ | i | d ƒ p d St t i | | ƒ ƒ } | i | d ƒ oA xo | D]2 } x) | i | | | d | ƒD] } | Vqm WqJ Wn2 | o) | o" d } t | t i | ƒ ƒ Vn d S( NR R s8 Additional properties are not allowed (%s %s unexpected)( R t setR t find_additional_propertiesR
R t
extras_msg( R t aPR
R t extrast extraR ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyt additionalProperties s c c sÒ | i | d ƒ p d S| i | d ƒ oI x t | ƒ D]4 \ } } x% | i | | d | ƒD] } | Vq] Wq8 Wn[ xW t t | ƒ | ƒ D]@ \ \ } } } x+ | i | | d | d | ƒD] } | Vq» WqŠ Wd S( Nt arrayR R R ( R t enumerateR
t zip( R t itemsR
R t indext itemR R ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyR $ s
c c s | i | d ƒ p | i | i d h ƒ d ƒ o d St | i d g ƒ ƒ } | i | d ƒ oS xµ t | | d | ƒD]4 \ } } x% | i | | d | ƒD] } | VqŸ Wqz Wnf | o] t | ƒ t | i d g ƒ ƒ j o8 d } t | t i | t | i d g ƒ ƒ ƒ ƒ Vn d S( NR R R t startR s3 Additional items are not allowed (%s %s unexpected)( R t gett lenR R
R R R ( R t aIR
R t len_itemsR R R ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyt additionalItems4 s -c c sz | i | d ƒ p d S| i d t ƒ o | | j } d } n | | j } d } | o t d | | | f ƒ Vn d S( Nt numbert exclusiveMinimums less than or equal tos less thans %r is %s the minimum of %r( R R" t FalseR ( R t minimumR
R t failedt cmp( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyR* H s
c c sz | i | d ƒ p d S| i d t ƒ o | | j } d } n | | j } d } | o t d | | | f ƒ Vn d S( NR' t exclusiveMaximums greater than or equal tos greater thans %r is %s the maximum of %r( R R" R) R ( R t maximumR
R R+ R, ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyR. Y s
c c sv | i | d ƒ p d St | t ƒ o | | } t | ƒ | j } n | | } | o t d | | f ƒ Vn d S( NR' s %r is not a multiple of %r( R t
isinstancet floatt intR ( R t dBR
R t quotientR+ ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyt
multipleOfj s
c c s@ | i | d ƒ o) t | ƒ | j o t d | f ƒ Vn d S( NR s %r is too short( R R# R ( R t mIR
R ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyt minItemsx s &c c s@ | i | d ƒ o) t | ƒ | j o t d | f ƒ Vn d S( NR s %r is too long( R R# R ( R R5 R
R ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyt maxItems} s &c c sB | o7 | i | d ƒ o$ t i | ƒ o t d | ƒ Vn d S( NR s %r has non-unique elements( R R t uniqR ( R t uIR
R ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyt uniqueItems‚ s c c sD | i | d ƒ o- t i | | ƒ o t d | | f ƒ Vn d S( Nt strings %r does not match %r( R R R R ( R t patrnR
R ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyR ‹ s c c s^ | i d j oJ y | i i | | ƒ WqZ t j
o } t | i d | i ƒVqZ Xn d S( Nt cause( t format_checkert Nonet checkR R t messageR= ( R t formatR
R R ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyRB “ s
c c s@ | i | d ƒ o) t | ƒ | j o t d | f ƒ Vn d S( NR; s %r is too short( R R# R ( R t mLR
R ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyt minLength› s &c c s@ | i | d ƒ o) t | ƒ | j o t d | f ƒ Vn d S( NR; s %r is too long( R R# R ( R RC R
R ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyt maxLength s &c c sÒ | i | d ƒ p d Sx³ t | ƒ D]¥ \ } } | | j o q% n | i | d ƒ o, xo | i | | d | ƒD] } | Vqq Wq% t i | ƒ } x4 | D], } | | j o t d | | f ƒ Vqš qš Wq% Wd S( NR R s %r is a dependency of %r( R R R
R t ensure_listR ( R t dependenciesR
R t propertyt
dependencyR ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyRG ¥ s"
c c s* | | j o t d | | f ƒ Vn d S( Ns %r is not one of %r( R ( R t enumsR
R ( ( s: /tmp/pip-build-lt8jXN/jsonschema/jsonschema/_validators.pyt enum» s
c c sÚ t | i d d ƒ } | d j oU | i i | ƒ i i ƒ } z/ | ~ } x | i | | ƒ D] } | Vq^ WWd QXn` | i i | ƒ \ } } | i i | ƒ z&