
    %e7                     d   d dl mZ  G d de          Z G d de          Z G d de          Z G d d	e          Z G d
 de          Z G d de          Z G d de          Z	 G d de	          Z
 G d de	          Z G d de	e          Z G d de          Z G d de          ZdS )    )utilc                       e Zd ZdZdS )ErrorzThe base class for all exceptions thrown by Streamlit.

    Should be used for exceptions raised due to user errors (typically via
    StreamlitAPIException) as well as exceptions raised by Streamlit's internal
    code.
    N__name__
__module____qualname____doc__     0lib/python3.11/site-packages/streamlit/errors.pyr   r      s          	Dr   r   c                       e Zd ZdS )DeprecationErrorNr   r   r	   r   r   r   r   r              Dr   r   c                       e Zd ZdS )NoStaticFilesNr   r   r   r   r   r   !   r   r   r   c                       e Zd ZdS )NoSessionContextNr   r   r   r   r   r   %   r   r   r   c                       e Zd ZdZdS )MarkdownFormattedExceptionzExceptions with Markdown in their description.

    Instances of this class can use markdown in their messages, which will get
    nicely formatted on the frontend.
    Nr   r   r   r   r   r   )   s          	Dr   r   c                       e Zd ZdZd ZdS )UncaughtAppExceptionzSCatchall exception type for uncaught exceptions that occur during script execution.c                     || _         d S N)exc)selfr   s     r   __init__zUncaughtAppException.__init__6   s    r   N)r   r   r	   r
   r   r   r   r   r   r   3   s)        ]]    r   r   c                       e Zd ZdZdefdZdS )StreamlitAPIExceptiona  Base class for Streamlit API exceptions.

    An API exception should be thrown when user code interacts with the
    Streamlit API incorrectly. (That is, when we throw an exception as a
    result of a user's malformed `st.foo` call, it should be a
    StreamlitAPIException or subclass.)

    When displaying these exceptions on the frontend, we strip Streamlit
    entries from the stack trace so that the user doesn't see a bunch of
    noise related to Streamlit internals.

    returnc                 *    t          j        |           S r   r   repr_r   s    r   __repr__zStreamlitAPIException.__repr__H       z$r   N)r   r   r	   r
   strr&   r   r   r   r    r    :   s9          #            r   r    c                       e Zd ZdS )DuplicateWidgetIDNr   r   r   r   r*   r*   L   r   r   r*   c                       e Zd ZdS )UnserializableSessionStateErrorNr   r   r   r   r,   r,   P   r   r   r,   c                   .     e Zd ZdZ fdZdefdZ xZS )StreamlitAPIWarningsUsed to display a warning.

    Note that this should not be "raised", but passed to st.exception
    instead.
    c                      t          t          |           j        |  dd l}dd l}|                                }|                    |          | _        d S )Nr   )superr.   r   inspect	tracebackcurrentframeextract_stacktacked_on_stack)r   argsr2   r3   f	__class__s        r   r   zStreamlitAPIWarning.__init__[   s`    1!4((1488  ""(66q99r   r!   c                 *    t          j        |           S r   r#   r%   s    r   r&   zStreamlitAPIWarning.__repr__c   r'   r   r   r   r	   r
   r   r(   r&   __classcell__r9   s   @r   r.   r.   T   s]         : : : : : #                r   r.   c                   .     e Zd ZdZ fdZdefdZ xZS )StreamlitDeprecationWarningr/   c                     d                     |||                    d          d                   } t                      j        |g|R   d S )Nz
{0}

You can disable this warning by disabling the config option:
`{1}`

```
st.set_option('{1}', False)
```
or in your `.streamlit/config.toml`
```
[deprecation]
{2} = false
```
    .   )formatsplitr1   r   )r   config_optionmsgr7   messager9   s        r   r   z$StreamlitDeprecationWarning.__init__n   s_     	 3 3C 8 8 ;	
 	
 	( 	(4((((((r   r!   c                 *    t          j        |           S r   r#   r%   s    r   r&   z$StreamlitDeprecationWarning.__repr__   r'   r   r;   r=   s   @r   r?   r?   g   s]         ) ) ) ) ). #                r   r?   c                   "     e Zd ZdZ fdZ xZS )StreamlitModuleNotFoundErrorzsPrint a pretty message when a Streamlit command requires a dependency
    that is not one of our core dependencies.c                 H    d| d} t                      j        |g|R   d S )Nz(This Streamlit command requires module "z" to be installed.)r1   r   )r   module_namer7   rG   r9   s       r   r   z%StreamlitModuleNotFoundError.__init__   sE    {    	 	(4((((((r   )r   r   r	   r
   r   r<   r=   s   @r   rJ   rJ      sB        1 1) ) ) ) ) ) ) ) )r   rJ   N)	streamlitr   	Exceptionr   r   r   r   r   r   r    r*   r,   Warningr.   r?   rJ   r   r   r   <module>rP      s$        	 	 	 	 	I 	 	 		 	 	 	 	u 	 	 		 	 	 	 	E 	 	 		 	 	 	 	u 	 	 		 	 	 	 	 	 	 	    5            6      $	 	 	 	 	- 	 	 		 	 	 	 	&; 	 	 	         /      &         "5      D	) 	) 	) 	) 	)#6 	) 	) 	) 	) 	)r   