File: //usr/lib/python3/dist-packages/pygments/__pycache__/plugin.cpython-311.pyc
�
�E�c
� �8 � d Z dZdZdZdZd� Zd� Zd� Zd� Zd � Z d
S )a
pygments.plugin
~~~~~~~~~~~~~~~
Pygments plugin interface. By default, this tries to use
``importlib.metadata``, which is in the Python standard
library since Python 3.8, or its ``importlib_metadata``
backport for earlier versions of Python. It falls back on
``pkg_resources`` if not found. Finally, if ``pkg_resources``
is not found either, no plugins are loaded at all.
lexer plugins::
[pygments.lexers]
yourlexer = yourmodule:YourLexer
formatter plugins::
[pygments.formatters]
yourformatter = yourformatter:YourFormatter
/.ext = yourformatter:YourFormatter
As you can see, you can define extensions for the formatter
with a leading slash.
syntax plugins::
[pygments.styles]
yourstyle = yourstyle:YourStyle
filter plugin::
[pygments.filter]
yourfilter = yourfilter:YourFilter
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
zpygments.lexerszpygments.formatterszpygments.styleszpygments.filtersc �P � ddl m} nY# t $ rL ddlm} nA# t $ r4 ddlm} || � � cY cY S # t t f$ r g cY cY cY S w xY ww xY wY nw xY w |� � }t |d� � r|� | �� � S |� | g � � S )N� )�entry_points)�iter_entry_points�select)�group)
�importlib.metadatar �ImportError�importlib_metadata�
pkg_resourcesr �OSError�hasattrr �get)�
group_namer r �groupss �1/usr/lib/python3/dist-packages/pygments/plugin.pyr r / s( � �5�3�3�3�3�3�3�3��� 5� 5� 5� 5�7�7�7�7�7�7�7��� 5� 5� 5�
5�;�;�;�;�;�;� )�(��4�4�4�4�4�4�4�� ��)�
�
�
�� � � � � � � �
���� 5����
8�7� 5���� �\�^�^�F��v�x� � � *� �}�}�:�}�.�.�.� �z�z�*�b�)�)�)sN � �
A��A�
A�;�A�A�A�A�A�A�A�A�Ac # �d K � t t � � D ]} | � � � V � �d S �N)r �LEXER_ENTRY_POINT�load��
entrypoints r �find_plugin_lexersr G sA � � � �'�(9�:�:� � �
��o�o������� � � c # �r K � t t � � D ]} | j | � � � fV � � d S r )r �FORMATTER_ENTRY_POINT�namer r s r �find_plugin_formattersr L sH � � � �'�(=�>�>� 1� 1�
��o�z���0�0�0�0�0�0�0�1� 1r c # �r K � t t � � D ]} | j | � � � fV � � d S r )r �STYLE_ENTRY_POINTr r r s r �find_plugin_stylesr Q sH � � � �'�(9�:�:� 1� 1�
��o�z���0�0�0�0�0�0�0�1� 1r c # �r K � t t � � D ]} | j | � � � fV � � d S r )r �FILTER_ENTRY_POINTr r r s r �find_plugin_filtersr# V sH � � � �'�(:�;�;� 1� 1�
��o�z���0�0�0�0�0�0�0�1� 1r N)
�__doc__r r r r"