File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/virtualenv/activation/nushell/__pycache__/__init__.cpython-310.pyc
Back
o ;j� � @ sf d dl mZ d dlmZ d dlmZ er&d dlmZ d dlm Z d dl mZ G dd� de�ZdgZ d S ) � )�annotations)� TYPE_CHECKING)�ViaTemplateActivator)�Iterator)�Path)�Creatorc @ s. e Zd Zddd�Zeddd��Zddd�ZdS )�NushellActivator�return� Iterator[str]c c s � dV d S )Nzactivate.nu� )�selfr r �Z/opt/saltstack/salt/lib/python3.10/site-packages/virtualenv/activation/nushell/__init__.py� templates s � zNushellActivator.templates�string�strc C sT d}d}| D ]}|dkr|d7 }t ||�}qd}qd|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 Z max_sharpsZcurrent_sharps�charZwrappingr r r �quote s zNushellActivator.quote�creatorr �dest_folderr �dict[str, str]c C sT | j d u rdn| j t|j�|jt|j�|j��t|jdd �pdt|jdd �p'dd�S )N� Ztcl_libZtk_lib)Z__VIRTUAL_PROMPT__Z__VIRTUAL_ENV__Z__VIRTUAL_NAME__Z__BIN_NAME__Z__TCL_LIBRARY__Z__TK_LIBRARY__)Zflag_promptr �destZenv_nameZbin_dir�relative_to�getattr�interpreter)r r r r r r �replacements&