U
    YSh                     @   s`   d Z ddlmZ ddlmZ ddlmZ dd e D Zdd e D Z	dd	 Z
d
d ZdS )z
    pygments.styles
    ~~~~~~~~~~~~~~~

    Contains built-in styles.

    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    )find_plugin_styles)ClassNotFound)STYLESc                 C   s0   i | ](\}}|d  |d  dd d | qS )   r   .z::)split.0kv r   K/root/rtd-docs/venv/lib/python3.8/site-packages/pygments/styles/__init__.py
<dictcomp>   s      r   c                 C   s"   i | ]\}}|d  |d |fqS )r   r   r   r	   r   r   r   r      s      c                 C   s   | t krt |  \}}d}n8t D ]\}}| |kr |  S q d}d|  }|  d }zt|dd|g}W n. tk
r   td||od d Y nX zt||W S  tk
r   td	|d
Y nX dS )z
    Return a style class by its short name. The names of the builtin styles
    are listed in :data:`pygments.styles.STYLE_MAP`.

    Will raise :exc:`pygments.util.ClassNotFound` if no style of that name is
    found.
    yes zpygments.styles.StyleNzCould not find style module z, though it should be builtinr   zCould not find style class z in style module.)_STYLE_NAME_TO_MODULE_MAPr   title
__import__ImportErrorr   getattrAttributeError)namemodclsbuiltin
found_namestyler   r   r   get_style_by_name   s*    

r   c                  c   s2   t  D ]} | d V  qt D ]\}}|V  qdS )zCReturn a generator for all styles by name, both builtin and plugin.r   N)r   valuesr   )r   r   _r   r   r   get_all_styles8   s    r"   N)__doc__Zpygments.pluginr   Zpygments.utilr   Zpygments.styles._mappingr   items	STYLE_MAPr   r   r"   r   r   r   r   <module>   s   
 