/usr/lib/python2.6/site-packages/jsonschema
NameSizeModeActions
schemas/-0755rm
tests/-0755rm
cli.py20140644editdlrm
cli.pyc28450644editdlrm
compat.py15530644editdlrm
compat.pyc19680644editdlrm
exceptions.py69730644editdlrm
exceptions.pyc109020644editdlrm
validators.py159210644editdlrm
validators.pyc163410644editdlrm
_format.py68810644editdlrm
_format.pyc90350644editdlrm
_reflect.py50230644editdlrm
_reflect.pyc55270644editdlrm
_utils.py49810644editdlrm
_utils.pyc84160644editdlrm
_validators.py117900644editdlrm
_validators.pyc129600644editdlrm
_version.py1220644editdlrm
_version.pyc2320644editdlrm
__init__.py6790644editdlrm
__init__.pyc10210644editdlrm
__main__.py390644editdlrm
__main__.pyc2100644editdlrm
Edit: /usr/lib/python2.6/site-packages/jsonschema/_utils.pyc (8416B)
Ñò DVc@såddkZddkZddkZddkZddklZlZlZdefd„ƒYZde fd„ƒYZ d„Z dd „Z d „Z d „Zd „Zd „Zd„Zd„Ze ƒe ƒd„Zd„ZdS(iÿÿÿÿN(t str_typestMutableMappingturlsplittURIDictcBsVeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( s9 Dictionary which uses normalized URIs as keys. cCst|ƒiƒS(N(Rtgeturl(tselfturi((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyt normalizescOs#tƒ|_|ii||ŽdS(N(tdicttstoretupdate(Rtargstkwargs((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyt__init__s cCs|i|i|ƒS(N(R R(RR((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyt __getitem__scCs||i|i|ƒ((R((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyR/s(RRRR(((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyR)scCs1tiddi|ƒƒ}ti|idƒƒS(sD Load a schema from ./schemas/``name``.json and return it. t jsonschemasschemas/{0}.jsonsutf-8(tpkgutiltget_datatformattjsontloadstdecode(tnametdata((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyt load_schema3sics#di‡fd†|iƒDƒƒS(sE A dumb version of :func:`textwrap.indent` from Python 3.3. s c3s%x|]}ddˆ|VqWdS(t iN((t.0tline(ttimes(s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pys Cs (tjoint splitlines(tstringR)((R)s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pytindent=scCs'|pdSddid„|DƒƒS(s¢ Construct a single string containing indexing operations for the indices. For example, [1, 2, "foo"] -> [1][2]["foo"] :type indices: sequence ts[%s]s][cssx|]}t|ƒVqWdS(N(R(R'tindex((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pys Rs (R*(tindices((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pytformat_as_indexFs ccsy|idhƒ}di|idhƒƒ}xE|D]=}||jo*|oti||ƒoq4n|Vq4q4WdS(sî Return the set of additional properties for the given ``instance``. Weeds out properties that should have been validated by ``properties`` and / or ``patternProperties``. Assumes ``instance`` is dict-like already. t propertiest|tpatternPropertiesN(tgetR*tretsearch(tinstancetschemaR2tpatternstproperty((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pytfind_additional_propertiesUs  cCs@t|ƒdjo d}nd}did„|Dƒƒ|fS(sA Create an error message for extra items or properties. itwastweres, cssx|]}t|ƒVqWdS(N(R(R'textra((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pys ss (RR*(textrastverb((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyt extras_msgis cCsrg}xR|D]J}y|it|dƒƒWq tj o|it|ƒƒq Xq Wd|di|ƒfS(s, Create an error message for a failure to match the given types. If the ``instance`` is an object and contains a ``name`` property, it will be considered to be a description of that object and used as its type. Otherwise the message is simply the reprs of the given ``types``. R#s%r is not of type %ss, (tappendRt ExceptionR*(R8ttypestreprsttype((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyt types_msgvs cCsutƒ}t|tƒp |f}nxB|D]:}t|tƒo|it|ƒƒq-|i|ƒq-Wt|ƒS(sã isinstance() can accept a bunch of really annoying different types: * a single type * a tuple of types * an arbitrary nested tree of tuples Return a flattened tuple of the given argument. (tsett isinstancettupleR tflattentadd(tsuitable_for_isinstanceREtthing((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyRLŠs  cCst|tƒo|gS|S(s^ Wrap ``thing`` in a list if it's a single str. Otherwise, return it unchanged. (RJR(RO((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyt ensure_list¡scCs(|tjo|S|tjo|S|S(sI A hack to make True and 1 and False and 0 unique for ``uniq``. (tTruetFalse(telementttruetfalse((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pytunbool®s   cCsy*ttd„|Dƒƒƒt|ƒjSWnÒtj oÆyatd„|Dƒƒ}ti|ddƒ}x/t||ƒD]\}}||jotSqyWWqÿt tfj oIg}x>|D]1}t |ƒ}||jotS|i |ƒqÀWqÿXnXt S(sÚ Check if all of a container's elements are unique. Successively tries first to rely that the elements are hashable, then falls back on them being sortable, and finally falls back on brute force. cssx|]}t|ƒVqWdS(N(RV(R'ti((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pys Æs cssx|]}t|ƒVqWdS(N(RV(R'RW((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pys És iN( RRIt TypeErrortsortedt itertoolstislicetNonetzipRRtNotImplementedErrorRVRCRQ(t containertsorttslicedRWtjtseente((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pytuniq»s& *     (RZR RR6tjsonschema.compatRRRRtobjectRR%R-R1R<RBRHRLRPRVRe(((s5/tmp/pip-build-lt8jXN/jsonschema/jsonschema/_utils.pyts