o
    Wi                     @  sf   d dl mZ d dlmZ d dlmZ er&d dlmZ d dlm	Z	 d dl
mZ G dd deZdgZd	S )
    )annotations)TYPE_CHECKING)ViaTemplateActivator)Iterator)Path)Creatorc                   @  s.   e Zd ZdddZedddZdddZdS )NushellActivatorreturnIterator[str]c                 c  s    dV  d S )Nzactivate.nu )selfr   r   Z/home/ubuntu/.local/lib/python3.10/site-packages/virtualenv/activation/nushell/__init__.py	templates   s   
zNushellActivator.templatesstringstrc                 C  sT   d}d}| D ]}|dkr|d7 }t ||}qd}qd|d  }d| d|  d| S )a  Nushell supports raw strings like: r###'this is a string'###.

        https://github.com/nushell/nushell.github.io/blob/main/book/working_with_strings.md

        This method finds the maximum continuous sharps in the string and then quote it with an extra sharp.

        r   #   r')max)r   
max_sharpscurrent_sharpscharwrappingr   r   r   quote   s   	zNushellActivator.quotecreatorr   dest_folderr   dict[str, str]c              	   C  sT   | j d u rdn| j t|j|jt|j|jt|jdd pdt|jdd p'ddS )N tcl_libtk_lib)__VIRTUAL_PROMPT____VIRTUAL_ENV____VIRTUAL_NAME____BIN_NAME____TCL_LIBRARY____TK_LIBRARY__)flag_promptr   destenv_namebin_dirrelative_togetattrinterpreter)r   r   r   r   r   r   replacements&   s   zNushellActivator.replacementsN)r	   r
   )r   r   r	   r   )r   r   r   r   r	   r   )__name__
__module____qualname__r   staticmethodr   r.   r   r   r   r   r      s
    
r   N)
__future__r   typingr   "virtualenv.activation.via_templater   collections.abcr   pathlibr   virtualenv.create.creatorr   r   __all__r   r   r   r   <module>   s    $