%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/pygments/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/pygments/__pycache__/plugin.cpython-312.pyc |
� |�e � �6 � d Z dZdZdZdZd� Zd� Zd� Zd� Zd � Z y )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-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. zpygments.lexerszpygments.formatterszpygments.styleszpygments.filtersc �" � ddl m} |� }t |d� r|j | �� S |j | g � S # t $ rF ddlm} n;# t $ r/ ddlm} || � cY cY S # t t f$ r g cY cY cY S w xY ww xY wY ��w xY w)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� �^�F��v�x� � �}�}�:�}�.�.� �z�z�*�b�)�)��% � 5� 5�7��� 5� 5�;� )��4�4�� ��)� �� � �� 5�� 8� 5�sW �? � B� A�B� B�A,� B�(B�,B�=B�?B�B�B�B� Bc # �X K � t t � D ] } | j � �� � y �w�N)r �LEXER_ENTRY_POINT�load�� entrypoints r �find_plugin_lexersr G s( � �� �'�(9�:� � ��o�o��� �s �(*c # �p K � t t � D ] } | j | j � f�� �" y �wr )r �FORMATTER_ENTRY_POINT�namer r s r �find_plugin_formattersr L s1 � �� �'�(=�>� 1� ��o�o�z���0�0�0�1�� �46c # �p K � t t � D ] } | j | j � f�� �" y �wr )r �STYLE_ENTRY_POINTr r r s r �find_plugin_stylesr Q s1 � �� �'�(9�:� 1� ��o�o�z���0�0�0�1�r c # �p K � t t � D ] } | j | j � f�� �" y �wr )r �FILTER_ENTRY_POINTr r r s r �find_plugin_filtersr# V s1 � �� �'�(:�;� 1� ��o�o�z���0�0�0�1�r N) �__doc__r r r r"