Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
cli.cpython-313.pyc108 linesDownload Raw Back to __pycache__
1�

2��j� ����SrSSKJr SSKJr SSKJr SSKJr SSK	r	SSKrSSK3r4SSKrSSKrSSK
JrJr SSKJr SS	KJrJr \R*"S5\SS9 "S
S\5r\"SS55r\"SS55r\"SS55rSr\	R:"SS9r\R?SSSSSS9 \R?SSS S!9 \R?S"S#S$S%/S$S&S'9 \R?S(S)\S*S+9 \R?S,S-S!9 \R?S.S/\R@"S05S19 \R?S2S3S!9 S4r!S5r"\6RFS6S4S7jr$\7RJ\8RL\9RN4S8jr(g)9z"10The ``jsonschema`` command line.11�)�metadata)�JSONDecodeError��resolve_name)�dedentN)�define�field)�SchemaError)�_RefResolver�
validator_forz�The jsonschema CLI is deprecated and will be removed in a future version. Please use check-jsonschema instead, which can be installed from https://pypi.org/project/check-jsonschema/�)�12stacklevelc��\rSrSrSrg)�_CannotLoadFile��N)�__name__�13__module__�__qualname__�__firstlineno__�__static_attributes__r��TD:\code\apps\devtools\python\user_packages\Python313\site-packages\jsonschema/cli.pyrrs��rrc�l�\rSrSr\"5r\"5r\"5r\S5r	Sr14SrSrSr
SrSrg	)15�16_Outputter�#c�f�USS:Xa[US5nOUSS:Xa17[5nU"WX#S9$)N�output�plain�error_format�pretty)�	formatter�stdout�stderr)�_PlainFormatter�_PrettyFormatter)�cls�	argumentsr#r$r"s     r�from_arguments�_Outputter.from_arguments*s@���X��'�)�'�	�.�(A�B�I�
�x�
 �H�
,�(�*�I��Y�v�E�Erc��[U5nU [R"U5sSSS5 $![a3nURU[R"5S9 [5UeSnAff=f![a3nURU[R"5S9 [5UeSnAff=f!,(df   g=f)N��path�exc_info)18�open�FileNotFoundError�filenotfound_error�sysr.r�json�loadr�
parsing_error)�selfr-�file�errors    rr4�_Outputter.load2s���	/���:�D�19�
3��y�y����T��	!�	/��#�#������#�G�!�#��.��	/��#�
3��"�"��s�|�|�~�"�F�%�'�U�2��
3���T�s<�0�B0�A0�20A-�.A(�(A-�021B-�:.B(�(B-�-B0�022B>c�n�URRURR"S0UD65 g�Nr)�_stderr�write�23_formatterr1�r6�kwargss  rr1�_Outputter.filenotfound_error@�&�������4�?�?�=�=�G��G�Hrc�n�URRURR"S0UD65 gr;)r<r=r>r5r?s  rr5�_Outputter.parsing_errorCs&�������4�?�?�8�8�B�6�B�Crc�n�URRURR"S0UD65 gr;)r<r=r>�validation_errorr?s  rrF�_Outputter.validation_errorFs&�������4�?�?�;�;�E�f�E�Frc�n�URRURR"S0UD65 gr;)�_stdoutr=r>�validation_successr?s  rrJ�_Outputter.validation_successIrBrrN)rrrrr	r>rIr<�classmethodr)r4r1r5rFrJrrrrrr#sJ����J��g�G��g�G��F��F�3�I�D�G�Irrc�@�\rSrSr\"S5rSrSrSrSr	Sr24Srg	)25r&�Mz`        ===[{type}]===({path})===26 27        {body}28        -----------------------------29        z===[SUCCESS]===({path})===30c�@�URRUSU<S3S9$)Nr0z does not exist.�r-�type�body)�31_ERROR_MSG�format�r6r-r.s   rr1�#_PrettyFormatter.filenotfound_errorZs/�����%�%��$��8�+�,�&�32�	33rc��Uup4nSR[R"X4U55nURR	UUR34US9$)N�rP)�join�	traceback�format_exceptionrSrTr)r6r-r.�exc_type�	exc_value�
exc_traceback�	exc_liness       rr5�_PrettyFormatter.parsing_errorasW��-5�*��]��G�G��&�&�x�M�J�35�	����%�%���"�"��&�36�	37rc�`�URRUURRUS9$)NrP)rSrT�	__class__r�r6�
instance_pathr8s   rrF�!_PrettyFormatter.validation_errorls1�����%�%�����)�)��&�38�	39rc�4�URRUS9$)N)r-)�_SUCCESS_MSGrT�r6rds  rrJ�#_PrettyFormatter.validation_successss��� � �'�'�]�'�;�;rrN)rrrrrrSrgr1r5rFrJrrrrr&r&Ms.���	��J�2�L�40�	41�42�<rr&c�:�\rSrSr\"5rSrSrSrSr	Sr43g)r%�wc��U<S3$)Nz does not exist.44rrUs   rr1�"_PlainFormatter.filenotfound_error|s����+�,�,rc�N�SRUS:XaSO45[U5US5$)NzFailed to parse {}: {}46�<stdin>�)rT�reprrUs   rr5�_PlainFormatter.parsing_errors,��)�0�0���*�I��T�47��Q�K�48�	49rc�4�URRXS9$)N)�	file_namer8)�
_error_formatrTrcs   rrF� _PlainFormatter.validation_error�s���!�!�(�(�=�(�N�Nrc��g)NrXrrhs  rrJ�"_PlainFormatter.validation_success�s��rrN)rrrrr	rur1r5rFrJrrrrr%r%ws ���G�M�-�50�O�rr%c�.�SU;aSU-n[U5$)N�.zjsonschema.r)�names r�_resolve_name_with_defaultr|�s��51�$���t�#�����rzJSON Schema Validation CLI)�descriptionz-iz52--instance�append�	instancesz�53        a path to a JSON instance (i.e. filename.json) to validate (may54        be specified multiple times). If no instances are provided via this55        option, one will be expected on standard input.56    )�action�dest�helpz-Fz--error-formata�57        the format to use for each validation error message, specified58        in a form suitable for str.format. This string will be passed59        one formatted object named 'error' for each ValidationError.60        Only provide this option when using --output=plain, which is the61        default. If this argument is unprovided and --output=plain is62        used, a simple default representation will be used.63    )r�z-oz--outputrr!z�64        an output format to use. 'plain' (default) will produce minimal65        text with one line for each error, while 'pretty' will produce66        more detailed human-readable output on multiple lines.67    )�choices�defaultr�z-Vz--validatorz�68        the fully qualified object name of a validator to use, or, for69        validators that are registered with jsonschema, simply the name70        of the class.71    )rQr�z72--base-uriz�73        a base URI to assign to the provided schema, even if it does not74        declare one (via e.g. $id). This option can be used if you wish to75        resolve relative references to a particular URI (or local path)76    z	--version�version�77jsonschema)r�r��schemaz=the path to a JSON Schema to validate with (i.e. schema.json)c���[[RU=(d S/S95nUSS:waUS(a[RS5eUSS:XaUScSUS'U$)Nz--help��argsrrr z3--error-format can only be used with --output plainz"{error.instance}: {error.message}78)�vars�parser�79parse_argsr8)r�r(s  rr�r��sr���V�&�&�D�,>�X�J�&�?�@�I����g�%�)�N�*C��l�l�A�80�	81����g�%�)�N�*C�*K�$I�	�.�!��rc��SnURU5HnSnURXS9 M U(dURUS9 U$)NFT�rdr8)rd)�iter_errorsrFrJ)rd�instance�	validator�	outputter�invalidr8s      r�_validate_instancer��sM���G��&�&�x�0�����"�"��"�L�1���$�$�=�$�A��Nrrpc�L�[R"[[US9S95 g)Nr�)r()r2�exit�runr�r�s r�mainr��s���H�H�S�:�4�0�
1�2rc	�^^�[RUUUS9mTRUS5nUSnUc[	U5nURU5 US(aTRUSp�O82UU4SjnS/nUS	b
[US	US839OSn	U"XIS9n84SnUHnU"U5n
U[UU
U85TS
9-nM U$![a gf=f![anTRUSUS9 SnAgSnAff=f![a SnMjf=f)N)r(r#r$r�rpr�r�rc�>�[R"T5$![a3nTRS[R86"5S9 [
5UeSnAff=f)Nror,)r3r4rr5r2r.r)�_r8r��stdins  ��rr4�run.<locals>.loadsR���
3��y�y��'�'��"�
3��'�'�"�S�\�\�^�(��&�'�U�2��	
3�s��87A�.A�Aro�base_uri)r��referrer)�resolverr)rdr�r�r�)88rr)r4rr�check_schemar89rFrr�)r(r#r$r�r��	Validatorr8r4rr�r��	exit_code�eachr�r�s   `          @rr�r��sk����)�)����*��I�����	�(� 3�4���+�&�I���!�&�)�	�����v�&����#�.�.�)�K�*@�i�	3��K�	�9091�:�	�	*���:�&���15�
�92�&�4�I��I���93	��D�z�H�
�+�"�!�#�#�	�
�I�
����c��������"�"�#�H�-��	#�	94�����<�	��I�	�s;�B7�C�C1�795C�C�96C.�C)�)C.�1D�D))�__doc__�	importlibrr3r�pkgutilr�textwrapr�argparser2rZ�warnings�attrsrr	�jsonschema.exceptionsr97�jsonschema.validatorsrr�warn�DeprecationWarning�	Exceptionrrr&r%r|�ArgumentParserr��add_argumentr�r�r��argvr�r#r$r�r�rrr�<module>r�s����� � ����98����-�=��
�
�	:����	�i�	��&I�&I��&I�R�&<�&<��&<�R�����(�99�	 �	 �,�100������,��	�101�	�	�����102�103��104�����*�
�h���105�	�	�����-�	#�106�������107�����������\�*���108����	H������h�h�q�r�l�3��*�*�S�Z�Z�s�y�y�:r
codekingpro/portable-devtools · Team Ai