Ë
    „V.j«	  ã                   óX   — d Z ddlZddlZddlZddlZd„ Z G d„ dej                  «      Zy)z#
Core components for click_plugins
é    Nc                 ó   ‡ — ˆ fd„}|S )ap  
    A decorator to register external CLI commands to an instance of
    `click.Group()`.

    Parameters
    ----------
    plugins : iter
        An iterable producing one `pkg_resources.EntryPoint()` per iteration.
    attrs : **kwargs, optional
        Additional keyword arguments for instantiating `click.Group()`.

    Returns
    -------
    click.Group()
    c                 ó  •— t        | t        j                  «      st        d«      ‚‰xs dD ]"  }	 | j	                  |j                  «       «       Œ$ | S # t        $ r' | j	                  t        |j                  «      «       Y ŒVw xY w)Nz<Plugins can only be attached to an instance of click.Group()© )	Ú
isinstanceÚclickÚGroupÚ	TypeErrorÚadd_commandÚloadÚ	ExceptionÚBrokenCommandÚname)ÚgroupÚentry_pointÚpluginss     €úTC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\click_plugins/core.pyÚ	decoratorzwith_plugins.<locals>.decorator   s   ø€ Ü˜%¤§¡Ô-ÜÐZÓ[Ð[à"š= bš=ˆKðCØ×!Ñ! +×"2Ñ"2Ó"4Õ5ð )ð ˆøô ò Cð ×!Ñ!¤-°×0@Ñ0@Ó"AÖBð	Cús   ±AÁ-BÂBr   )r   r   s   ` r   Úwith_pluginsr      s   ø€ ô$ð Ðó    c                   ó"   — e Zd ZdZd„ Zd„ Zd„ Zy)r   a^  
    Rather than completely crash the CLI when a broken plugin is loaded, this
    class provides a modified help message informing the user that the plugin is
    broken and they should contact the owner.  If the user executes the plugin
    or specifies `--help` a traceback is reported showing the exception the
    plugin loader encountered.
    c                 óŽ  — t         j                  j                  | |«       t        j                  j                  t        j                  xr t        j                  d   xs t        «      }t        j                  j                  d«      rd}nd}dt        j                  «       z   | _        |d|›d| j                  ›d�z   | _        y	)
z[
        Define the special help messages after instantiating a `click.Command()`.
        r   ÚCLICK_PLUGINS_HONESTLYu   ðŸ’©u   â€ zK
Warning: entry point could not be loaded. Contact its author for help.


z& Warning: could not load plugin. See `Ú z	 --help`.N)r   ÚCommandÚ__init__ÚosÚpathÚbasenameÚsysÚargvÚ__file__ÚenvironÚgetÚ	tracebackÚ
format_excÚhelpr   Ú
short_help)Úselfr   Ú	util_nameÚicons       r   r   zBrokenCommand.__init__;   s™   € ô 	�‰×Ñ˜t TÔ*ä—G‘G×$Ñ$¤S§X¡XÒ%=´#·(±(¸1±+Ò%IÄÓJˆ	ä�:‰:�>‰>Ð2Ô3Ø ‰DàˆDð+ä×"Ñ"Ó$ñ%ð 	Œ	ñ
 Ú˜$Ÿ)›)ð%ñ %ð 	�r   c                 ó|   — t        j                  | j                  |j                  ¬«       |j	                  d«       y)z?
        Print the traceback instead of doing nothing.
        )Úcoloré   N)r   Úechor&   r,   Úexit)r(   Úctxs     r   ÚinvokezBrokenCommand.invokeR   s%   € ô 	�
‰
�4—9‘9 C§I¡IÕ.Ø�‰��r   c                 ó   — |S )Nr   )r(   r0   Úargss      r   Ú
parse_argszBrokenCommand.parse_args[   s   € Øˆr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r1   r4   r   r   r   r   r   1   s   „ ñò&ò.ór   r   )r8   r   r   r   r$   r   r   r   r   r   r   Ú<module>r9      s.   ðñó
 ã 	Û 
Û ò!ôH+�E—M‘Mõ +r   