
    k7i	                         S SK JrJrJr  \(       a  S SKJrJrJr  SSKJ	r	J
r
  SSKJr  \ " S S\5      5       r\ " S S	\5      5       r\ " S
 S\5      5       rg)    )TYPE_CHECKINGProtocolruntime_checkable)ConsoleConsoleOptionsRenderableType   )	HelpEntry	HelpPanel)
ColumnSpecc                   "    \ rS rSrSrSS jrSrg)Renderer
   zJProtocol for column renderers that transform HelpEntry to display content.c                     g )N )selfentrys     Q/home/james-whalen/.local/lib/python3.13/site-packages/cyclopts/help/protocols.py__call__Renderer.__call__   s        r   N)r   r
   returnr   __name__
__module____qualname____firstlineno____doc__r   __static_attributes__r   r   r   r   r   
   s    TCr   r   c            	       >    \ rS rSrSrSSSSS\S   S	\S
   4S jrSrg)ColumnSpecBuilder   z Protocol for ColumnSpecBuilders.consoler   optionsr   entriesr
   r   )r   .c                     g)a  Build column specifications based on console settings and entries.

Parameters
----------
console : ~rich.console.Console
    The Rich console instance.
options : ~rich.console.ConsoleOptions
    Console rendering options.
entries : list[HelpEntry]
    List of help entries to be displayed.

Returns
-------
tuple[ColumnSpec, ...]
    Tuple of column specifications for table rendering.
Nr   )r   r#   r$   r%   s       r   r   ColumnSpecBuilder.__call__   s    & 	r   r   N)	r   r   r   r   r   listtupler   r   r   r   r   r!   r!      s5    * +;FJ;FW	 	!r   r!   c                   2    \ rS rSrSr        SS jrSrg)HelpFormatter+   a~  Protocol for help **formatter** functions.

It's the Formatter's job to transform a :class:`.HelpPanel` into rendered text on the display.

Implementations may optionally provide the following methods for custom rendering of "usage" and "description". If these methods are not provided, default rendering will be used.

.. code-block:: python

    def render_usage(self, console: Console, options: ConsoleOptions, usage: Any) -> None:
        """Render the usage line."""
        ...

    def render_description(self, console: Console, options: ConsoleOptions, description: Any) -> None:
        """Render the description."""
        ...
Nc                     g)a  Format and render a single help panel.

Parameters
----------
console : ~rich.console.Console
    Console to render to.
options : ~rich.console.ConsoleOptions
    Console rendering options.
panel : HelpPanel
    Help panel to render (commands, parameters, etc).
Nr   )r   r#   r$   panels       r   r   HelpFormatter.__call__>   s    " 	r   r   )r#   r   r$   r   r.   r   r   Nr   r   r   r   r+   r+   +   s2    " " 	
 
r   r+   N)typingr   r   r   rich.consoler   r   r   helpr
   r   specsr   r   r!   r+   r   r   r   <module>r4      sn    = =DD*! Dx D D   2 #H # #r   