
    q"h&                     H    S r SSKrSSKJr  SSKJr  S/rS r " S S5      rg)z
pygments.formatter
~~~~~~~~~~~~~~~~~~

Base formatter class.

:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
    N)get_bool_opt)get_style_by_name	Formatterc                 F    [        U [        5      (       a  [        U 5      $ U $ N)
isinstancestrr   )styles    P/var/www/html/env/lib/python3.13/site-packages/pip/_vendor/pygments/formatter.py_lookup_styler      s    % ''L    c                   D    \ rS rSrSrSr/ r/ rSrS r	S
S jr
S rS rS	rg)r      a  
Converts a token stream to text.

Formatters should have attributes to help selecting them. These
are similar to the corresponding :class:`~pygments.lexer.Lexer`
attributes.

.. autoattribute:: name
   :no-value:

.. autoattribute:: aliases
   :no-value:

.. autoattribute:: filenames
   :no-value:

You can pass options as keyword arguments to the constructor.
All formatters accept these basic options:

``style``
    The style to use, can be a string or a Style subclass
    (default: "default"). Not used by e.g. the
    TerminalFormatter.
``full``
    Tells the formatter to output a "full" document, i.e.
    a complete self-contained document. This doesn't have
    any effect for some formatters (default: false).
``title``
    If ``full`` is true, the title that should be used to
    caption the document (default: '').
``encoding``
    If given, must be an encoding name. This will be used to
    convert the Unicode token strings to byte strings in the
    output. If it is "" or None, Unicode strings will be written
    to the output file, which most file-like objects do not
    support (default: None).
``outencoding``
    Overrides ``encoding`` if given.

NTc                 b   [        UR                  SS5      5      U l        [        USS5      U l        UR                  SS5      U l        UR                  SS5      =(       d    SU l        U R                  S	;   a  S
U l        UR                  S5      =(       d    U R                  U l        Xl        g)z
As with lexers, this constructor takes arbitrary optional arguments,
and if you override it, you should first process your own options, then
call the base class implementation.
r
   defaultfullFtitle encodingN)guesschardetzutf-8outencoding)r   getr
   r   r   r   r   options)selfr   s     r   __init__Formatter.__init__S   s     #7;;w	#BC
 &%8	[["-
J5===00#DMM2Cdmmr   c                     g)a  
This method must return statements or declarations suitable to define
the current style for subsequent highlighted text (e.g. CSS classes
in the `HTMLFormatter`).

The optional argument `arg` can be used to modify the generation and
is formatter dependent (it is standardized because it can be given on
the command line).

This method is called by the ``-S`` :doc:`command-line option <cmdline>`,
the `arg` is then given by the ``-a`` option.
r    )r   args     r   get_style_defsFormatter.get_style_defsc   s     r   c                     U R                   (       a)  [        R                  " U R                   5      S   " U5      nU R                  X5      $ )z
This method must format the tokens from the `tokensource` iterable and
write the formatted version to the file object `outfile`.

Formatter options can control how exactly the tokens are converted.
   )r   codecslookupformat_unencoded)r   tokensourceoutfiles      r   formatFormatter.formatr   s8     ==mmDMM215g>G$$[::r   c                     U $ r   r   )clsnames     r   __class_getitem__Formatter.__class_getitem__   s    
r   )r   r   r   r
   r   )r   )__name__
__module____qualname____firstlineno____doc__r.   aliases	filenamesunicodeoutputr   r!   r*   r/   __static_attributes__r   r   r   r   r      s8    'T D G
 I M 
;r   )	r5   r%   pip._vendor.pygments.utilr   pip._vendor.pygments.stylesr   __all__r   r   r   r   r   <module>r=      s-     2 9-h hr   