Team Ai
Datasetpublic

codekingpro/portable-devtools

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

2�j}���SrSSKJr SSKJr SSKJr SSKJr /SQr	"SS\5r3"S	S4\5rSrSr
"S
S\5rg)z�5pygments.formatters.other6~~~~~~~~~~~~~~~~~~~~~~~~~7 8Other formatters: NullFormatter, RawTokenFormatter.9 10:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.11:license: BSD, see LICENSE for details.12�)�	Formatter)�get_choice_opt)�Token)�colorize)�
NullFormatter�RawTokenFormatter�TestcaseFormatterc�0�\rSrSrSrSrSS/rS/rSrSr	g	)13r�z314Output the text unchanged without any formatting.15z	Text only�text�nullz*.txtc��URnUH?upEU(a"URURU55 M.URU5 MA g�N)�encoding�write�encode)�self�tokensource�outfile�enc�ttype�values      �_D:\code\apps\devtools\python\user_packages\Python313\site-packages\pygments/formatters/other.py�format�NullFormatter.formats;���m�m��'�L�E���
�
�e�l�l�3�/�0��
�
�e�$�	(��N)16�__name__�17__module__�__qualname__�__firstlineno__�__doc__�name�aliases�	filenamesr�__static_attributes__rrrrrs$����D��v��G��	�I�%rrc�:�\rSrSrSrSrSS/rS/rSrSr	S	r18S19rg)r�$aI20Format tokens as a raw representation for storing token streams.21 22The format is ``tokentype<TAB>repr(tokenstring)\n``. The output can later23be converted to a token stream with the `RawTokenLexer`, described in the24:doc:`lexer list <lexers>`.25 26Only two options are accepted:27 28`compress`29    If set to ``'gz'`` or ``'bz2'``, compress the output with the given30    compression algorithm after encoding (default: ``''``).31`error_color`32    If set to a color name, highlight error tokens using that color.  If33    set but with no value, defaults to ``'red'``.34 35    .. versionadded:: 0.1136 37z38Raw tokens�raw�tokensz*.rawFc�^�[R"U40UD6 SUl[US/SQS5UlURSS5UlURSLaSUlURb[URS5 gg![a [SUR<S	35ef=f)39N�ascii�compress)��none�gz�bz2r.�error_colorT�redzInvalid color z40 specified)41r�__init__rrr-�getr2r�KeyError�42ValueError�r�optionss  rr4�RawTokenFormatter.__init__>s������4�+�7�+� ��
�&�w�43�'@�"�F��
�"�;�;�}�d�;������t�#�$�D�����'�
R���)�)�2�.�(���
R� �>�$�2B�2B�1E�Z�!P�Q�Q�
R�s�/B�%B,c�l^^44�TRS5 URS:Xa1SSKnUR	SSST5mTRnTR45nOLURS:Xa$SSKnURS5m46U47U4S	jnU48U4S49jnOTRnTRnUR(aKUHDupxSXx4-n	U[RLaU"[URU	55 M<U"U	5 MF OUHupxU"SXx4-5 M U"5 g![a [S5ef=f)Nrz3The raw tokens formatter needs a binary output filer0rr.�wb�	r1c�F>�TRTRU55 gr)rr-)r�50compressorrs ��rr�'RawTokenFormatter.format.<locals>.write_s����
�
�j�1�1�$�7�8rc�d>�TRTR55 TR5 gr)r�flush)r?rs��rrB�'RawTokenFormatter.format.<locals>.flushbs!����
�
�j�.�.�0�1��
�
�rs%r	%r51)
r�	TypeErrorr-�gzip�GzipFile�closer1�
BZ2CompressorrBr2r�Errorr)rrrrErrBr1rr�liner?s  `       @rr�RawTokenFormatter.formatOs���	+��M�M�#���=�=�D� ���m�m�B��a��9�G��M�M�E��M�M�E�
�]�]�e�
#���*�*�1�-�J�
9�
 ��M�M�E��M�M�E���� +���"�e�^�3���E�K�K�'��(�4�#3�#3�T�:�;��$�K�!,�!,����k�U�N�2�3�!,�
���C�	+��*�+�
+�	+�s�D�D3)r-rr2N)rrr r!r"r#r$r%�
unicodeoutputr4rr&rrrrr$s/���&�D��h��G��	�I��M�R�"$rrzG    def testNeedsName(lexer):52        fragment = %r53        tokens = [54zD        ]55        assert list(lexer.get_tokens(fragment)) == tokens56c�.�\rSrSrSrSrS/rSrSrSr	g)	r	�zI57Format tokens as appropriate for a new testcase.58 59.. versionadded:: 2.060�Testcase�testcasec��[R"U40UD6 URbURS:wa[S5egg)N�utf-8z*Only None and utf-8 are allowed encodings.)rr4rr7r8s  rr4�TestcaseFormatter.__init__�s?�����4�+�7�+��=�=�$����'�)A��I�J�J�*B�$rc	��Sn/n/nUH1upgURU5 URUSUSU<S35 M3 [SRU54-nSRU5n	[n61URcURX�-U62-5 O`URUR
S55 URU	R
S55 URU63R
S55 UR5 g)Nz            �(z, z),64r.rR)�append�TESTCASE_BEFORE�join�TESTCASE_AFTERrrrrB)rrr�indentation�rawbuf�outbufrr�before�during�afters           rr�TestcaseFormatter.format�s���������'�L�E��M�M�%� ��M�M�[�M��5�'��E�9�D�A�B�(�!�B�G�G�F�O�#5�5�����������=�=� ��M�M�&�/�E�1�2��M�M�&�-�-��0�1��M�M�&�-�-��0�1��M�M�%�,�,�w�/�0��
�
�rrN)65rrr r!r"r#r$r4rr&rrrr	r	�s ���66�D��l�G�K�67rr	N)r"�pygments.formatterr�
pygments.utilr�pygments.tokenr�pygments.consoler�__all__rrrWrYr	rrr�<module>rfsR���)�(� �%�68E��%�I�%�"O�	�O�d��69���	�r
codekingpro/portable-devtools · Team Ai