Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
formatter.cpython-313.pyc82 linesDownload Raw Back to __pycache__
1�

2�j��H�SrSSKrSSKJr SSKJr S/rSr"SS5rg)z�3pygments.formatter4~~~~~~~~~~~~~~~~~~5 6Base formatter class.7 8:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.9:license: BSD, see LICENSE for details.10�N)�get_bool_opt)�get_style_by_name�	Formatterc�F�[U[5(a[U5$U$�N)�11isinstance�strr)�styles �XD:\code\apps\devtools\python\user_packages\Python313\site-packages\pygments/formatter.py�
_lookup_stylers���%���� ��'�'��L�c�D�\rSrSrSrSr/r/rSrSr	S12Sjr13SrSrS	r
g)r�a�14Converts a token stream to text.15 16Formatters should have attributes to help selecting them. These17are similar to the corresponding :class:`~pygments.lexer.Lexer`18attributes.19 20.. autoattribute:: name21   :no-value:22 23.. autoattribute:: aliases24   :no-value:25 26.. autoattribute:: filenames27   :no-value:28 29You can pass options as keyword arguments to the constructor.30All formatters accept these basic options:31 32``style``33    The style to use, can be a string or a Style subclass34    (default: "default"). Not used by e.g. the35    TerminalFormatter.36``full``37    Tells the formatter to output a "full" document, i.e.38    a complete self-contained document. This doesn't have39    any effect for some formatters (default: false).40``title``41    If ``full`` is true, the title that should be used to42    caption the document (default: '').43``encoding``44    If given, must be an encoding name. This will be used to45    convert the Unicode token strings to byte strings in the46    output. If it is "" or None, Unicode strings will be written47    to the output file, which most file-like objects do not48    support (default: None).49``outencoding``50    Overrides ``encoding`` if given.51 52NTc�b�[URSS55Ul[USS5UlURSS5UlURSS5=(d SUlURS	;aS53UlURS5=(d URUlXlg)z�54As with lexers, this constructor takes arbitrary optional arguments,55and if you override it, you should first process your own options, then56call the base class implementation.57r58�default�fullF�title��encodingN)�guess�chardetzutf-8�outencoding)r�getr59rrrr�options)�selfrs  r�__init__�Formatter.__init__Ss���#�7�;�;�w�	�#B�C��60� ��&�%�8��	��[�[��"�-��61����J��5�=���
��=�=�0�0�#�D�M����M�2�C�d�m�m��
��r
c��g)a�62This method must return statements or declarations suitable to define63the current style for subsequent highlighted text (e.g. CSS classes64in the `HTMLFormatter`).65 66The optional argument `arg` can be used to modify the generation and67is formatter dependent (it is standardized because it can be given on68the command line).69 70This method is called by the ``-S`` :doc:`command-line option <cmdline>`,71the `arg` is then given by the ``-a`` option.72r�)r�args  r�get_style_defs�Formatter.get_style_defscs��r
c��UR(a)[R"UR5S"U5nURX5$)z�73This method must format the tokens from the `tokensource` iterable and74write the formatted version to the file object `outfile`.75 76Formatter options can control how exactly the tokens are converted.77�)r�codecs�lookup�format_unencoded)r�tokensource�outfiles   r�format�Formatter.formatrs8���=�=��m�m�D�M�M�2�1�5�g�>�G��$�$�[�:�:r
c��U$rr)�cls�names  r�__class_getitem__�Formatter.__class_getitem__�s���78r
)rrrr79r)r)�__name__�80__module__�__qualname__�__firstlineno__�__doc__r.�aliases�	filenames�
unicodeoutputrr!r*r/�__static_attributes__rr
rrrs8��'�T�D��G�81�I��M�� 
�82;�r
)	r5r%�
pygments.utilr�pygments.stylesr�__all__rrrr
r�<module>r=s-����&�-��-���h�hr
codekingpro/portable-devtools · Team Ai