
    /_i                    `    d dl mZ d dlZd dlZd dlmZmZ d dlmZ erd dl	m
Z
  G d d      Zy)    )annotationsN)TYPE_CHECKINGAny)util)TracebackTypec                  @    e Zd ZdZddZddZddZ	 	 	 	 	 	 	 	 d	dZy)
TemporaryDirectorya  Temporary directory context manager.

    Creates a temporary directory that exists within the context manager scope.
    It returns the path to the created directory.
    Wrapper on top of tempfile.mkdtemp.

    Parameters
    ----------
    suffix : str or None
        Suffix to the filename.
    prefix : str or None
        Prefix to the filename.
    dir : str or None
        Enclosing directory.

    c                .    || _         || _        d | _        y N)_args_kwargs_path)selfargskwargss      \/var/www/html/land_sniper/venv/lib/python3.12/site-packages/streamlit/temporary_directory.py__init__zTemporaryDirectory.__init__0   s    
!%
    c                ,    t        j                  |       S r   )r   repr_r   s    r   __repr__zTemporaryDirectory.__repr__5   s    zz$r   c                v    t        j                  | j                  i | j                  | _        | j                  S r   )tempfilemkdtempr   r   r   r   s    r   	__enter__zTemporaryDirectory.__enter__8   s+    %%tzzBT\\B
zzr   c                \    | j                   r t        j                  | j                          y y r   )r   shutilrmtree)r   exc_type	exc_valueexc_tracebacks       r   __exit__zTemporaryDirectory.__exit__<   s      ::MM$**% r   N)r   r   r   r   returnNone)r$   str)r    ztype[BaseException] | Noner!   zBaseException | Noner"   zTracebackType | Noner$   r%   )__name__
__module____qualname____doc__r   r   r   r#    r   r   r	   r	      sA    "&
 &,& (& ,	&
 
&r   r	   )
__future__r   r   r   typingr   r   	streamlitr   typesr   r	   r+   r   r   <module>r0      s&    #   % #%& %&r   