Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
³‹EYc@sºddlZddlZddlZddlmZddlmZdefd„ƒYZigd6gd6Z	dddd&d„Zed	ƒd
„ƒZej
dƒZedddd
ƒd„ƒZeedƒrõeddejƒd„ƒZnej
dƒZeddddƒd„ƒZyddlZWnek
rEnXeddeƒd„ƒZyddlZWnYek
rÌyddlZWnek
r¤qâXeddeejfƒd„ƒZnXedƒd„ƒZeddejƒd„ƒZedddeƒd„ƒZedd deƒd!„ƒZyddl Z Wnek
r_n7Xd"„Z!edd#dee"fƒd$„ƒZ#d%„Z$ee	dƒZ%ee	dƒZ&dS('iÿÿÿÿN(t	str_types(tFormatErrort
FormatCheckercBsJeZdZiZdd„Zdd„ZeeƒZd„Z	d„Z
RS(sñ
    A ``format`` property checker.

    JSON Schema does not mandate that the ``format`` property actually do any
    validation. If validation is desired however, instances of this class can
    be hooked into validators to enable format validation.

    :class:`FormatChecker` objects always return ``True`` when asked about
    formats that they do not know how to validate.

    To check a custom format using a function that takes an instance and
    returns a ``bool``, use the :meth:`FormatChecker.checks` or
    :meth:`FormatChecker.cls_checks` decorators.

    Arguments:

        formats (iterable):

            The known formats to validate. This argument can be used to
            limit which formats will be used during validation.

    csD|dkr!ˆjjƒˆ_nt‡fd†|Dƒƒˆ_dS(Nc3s"|]}|ˆj|fVqdS(N(tcheckers(t.0tk(tself(sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pys	<genexpr>'s(tNoneRtcopytdict(Rtformats((RsG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pyt__init__#scs‡‡‡fd†}|S(s
        Register a decorated function as validating a new format.

        Arguments:

            format (str):

                The format that the decorated function will check.

            raises (Exception):

                The exception(s) raised by the decorated function when
                an invalid instance is found.

                The exception object will be accessible as the
                :attr:`ValidationError.cause` attribute of the resulting
                validation error.

        cs|ˆfˆjˆ<|S(N(R(tfunc(tformattraisesR(sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pyt_checks>s((RR
RR((R
RRsG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytchecks)scCs‡||jkrdS|j|\}}d\}}y||ƒ}Wn|k
r]}|}nX|sƒtd||fd|ƒ‚ndS(s~
        Check whether the instance conforms to the given format.

        Arguments:

            instance (any primitive type, i.e. str, number, bool):

                The instance to check

            format (str):

                The format that instance should conform to


        Raises:

            :exc:`FormatError` if instance does not conform to ``format``

        Ns%r is not a %rtcause(NN(RRR(RtinstanceR
RRtresultRte((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytcheckEs
cCs1y|j||ƒWntk
r(tSXtSdS(s[
        Check whether the instance conforms to the given format.

        Arguments:

            instance (any primitive type, i.e. str, number, bool):

                The instance to check

            format (str):

                The format that instance should conform to

        Returns:

            bool: Whether it conformed

        N(RRtFalsetTrue(RRR
((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytconformshs

N((t__name__t
__module__t__doc__RRRRtclassmethodt
cls_checksRR(((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pyR	s	#tdraft3tdraft4cs1ˆp	|‰ˆp|‰‡‡‡fd†}|S(Ncshˆr2tdjˆƒtjˆˆƒ|ƒ}nˆrdtdjˆƒtjˆˆƒ|ƒ}n|S(NRR(t_draft_checkerstappendRR(R(RRR(sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytwrap‹s((tbothRRRR"((RRRsG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pyt_checks_drafts‡stemailcCst|tƒstSd|kS(Nt@(t
isinstanceRR(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_email–ss$^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$s
ip-addresstipv4cCsCt|tƒstStj|ƒs&tStd„|jdƒDƒƒS(Ncss1|]'}dt|ƒko&dknVqdS(iiÿN(tint(Rt	component((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pys	<genexpr>¦st.(R'RRt_ipv4_retmatchRtalltsplit(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_ipv4 s
t	inet_ptontipv6RcCs&t|tƒstStjtj|ƒS(N(R'RRtsocketR2tAF_INET6(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_ipv6ªss#^[A-Za-z0-9][A-Za-z0-9\.\-]{1,255}$s	host-namethostnamecCs`t|tƒstStj|ƒs&tS|jdƒ}x$|D]}t|ƒdkr<tSq<WtS(NR,i?(R'RRt
_host_name_reR.RR0tlen(Rt
componentsR+((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_host_name´s
turicCs&t|tƒstStj|ddƒS(NtruletURI(R'RRtrfc3987tparse(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_uriÆss	date-timecCs t|tƒstStj|ƒS(N(R'RRtisodatetparse_datetime(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_datetimeÕscCs t|tƒstStj|ƒS(N(R'RRtstrict_rfc3339tvalidate_rfc3339(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pyRDÛstregexcCs t|tƒstStj|ƒS(N(R'RRtretcompile(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_regexâstdatecCs&t|tƒstStjj|dƒS(Ns%Y-%m-%d(R'RRtdatetimetstrptime(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_dateésttimecCs&t|tƒstStjj|dƒS(Ns%H:%M:%S(R'RRRLRM(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_timeðscCs
tj|ƒS(N(t	webcolorst
normalize_hex(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_css_color_codeüstcolorcCs3t|tƒs%|jƒtjkr)tSt|ƒS(N(R'RtlowerRQtcss21_names_to_hexRRS(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pytis_css21_colorÿscCs#|jƒtjkrtSt|ƒS(N(RURQtcss3_names_to_hexRRS(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pyt
is_css3_colors(('RLRHR4tjsonschema.compatRtjsonschema.exceptionsRtobjectRR RR$R(RIR-R1thasattrterrorR6R8R;R?tImportErrort
ValueErrorRARERBtISO8601ErrorRDRJRNRPRQRSt	TypeErrorRWRYtdraft3_format_checkertdraft4_format_checker(((sG/home/tvault/.virtenv/lib/python2.7/site-packages/jsonschema/_format.pyt<module>sP{	!



(
	$