o
    h                     @   sL   d Z ddlmZ ddlmZ dee dee fddZdedefd	d
ZdS )z!Utilities for working with paths.    )Sequence)suppresssegmentsreturnc              	   C   sx   g }| D ](}|dkr#t t |  W d   n1 sw   Y  q|dkr,|| q| r:| d dv r:|d |S )z1Drop '.' and '..' from a sequence of str segments..N.)r   r    )r   
IndexErrorpopappend)r   resolved_pathseg r   ^/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/yarl/_path.pynormalize_path_segments   s   



r   pathc                 C   s@   d}| r| d dkrd}| dd  } |  d}|dt| S )Nr	   r   /   )splitjoinr   )r   prefixr   r   r   r   normalize_path   s   
r   N)	__doc__collections.abcr   
contextlibr   strlistr   r   r   r   r   r   <module>   s
    