o
    ADiSw                     @  s"  U d Z ddlmZ ddlZddlZddlZddlmZ ddlmZ ddl	m
Z
 ddl	mZ ddl	mZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ g dZeeZi Zded< G dd dZG dd deZG dd deZG dd deZG dd deZG dd deZ G dd deZ!G dd  d eZ"G d!d" d"eZ#G d#d$ d$eZ$G d%d& d&eZ%G d'd( d(eZ&G d)d* d*eZ'G d+d, d,eZ(G d-d. d.eZ)G d/d0 d0eZ*G d1d2 d2eZ+G d3d4 d4eZ,G d5d6 d6eZ-G d7d8 d8eZ.G d9d: d:eZ/G d;d< d<eZ0G d=d> d>eZ1G d?d@ d@eZ2G dAdB dBeZ3G dCdD dDeZ4G dEdF dFeZ5G dGdH dHeZ6G dIdJ dJeZ7G dKdL dLeZ8G dMdN dNeZ9G dOdP dPeZ:G dQdR dReZ;G dSdT dTeZ<G dUdV dVeZ=G dWdX dXeZ>G dYdZ dZeZ?G d[d\ d\eZ@dS )]a   upath._flavour_sources

<experimental!>

Warning
-------
  Do not modify this file manually!
  It is generated by `dev/generate_flavours.py`

To be able to parse the different filesystem uri schemes, we need
the string parsing functionality each of the filesystem implementations.
In an attempt to support parsing uris without having to import the
specific filesystems, we extract the necessary subset of the
AbstractFileSystem classes and generate a new "flavour" class for
each of the known filesystems. This will allow us to provide a
`PurePath` equivalent `PureUPath` for each protocol in the future
without a direct dependency on the underlying filesystem package.

    )annotationsN)PurePath)PureWindowsPath)Any)Literal)castparse_qs)urlsplit)make_path_posixinfer_storage_options)stringify_path)AbstractFileSystemFlavourFileSystemFlavourBaseflavour_registryz&dict[str, type[FileSystemFlavourBase]]r   c                   @  sX   e Zd ZU dZded< ded< ded< edd	 Zed
d Zedd Z	dddZ
dS )r   z"base class for the fsspec flavoursstr | tuple[str, ...]protocolzLiteral['/', '']root_markerLiteral['/']sepc                 C     t NNotImplementedErrorclspath r   O/var/www/Datamplify/venv/lib/python3.10/site-packages/upath/_flavour_sources.py_strip_protocolA      z%FileSystemFlavourBase._strip_protocolc                 C  r   r   r   r   r   r   r   _get_kwargs_from_urlsE   r!   z+FileSystemFlavourBase._get_kwargs_from_urlsc                 C  r   r   r   r   r   r   r   _parentI   r!   zFileSystemFlavourBase._parentr   r   c                 K  sN   t | jtr| jf}nt| j}|D ]}|tv r td|d| t|< qd S )Nz	protocol z already registered)
isinstancer   strtupler   
ValueError)r   kwargs	protocolsr   r   r   r   __init_subclass__M   s   


z'FileSystemFlavourBase.__init_subclass__N)r   r   )__name__
__module____qualname____doc____annotations__classmethodr    staticmethodr#   r$   r+   r   r   r   r   r   :   s   
 


r   c                   @  s^   e Zd ZU dZdZdZded< dZded< d	Zd
ed< e	dd Z
edd Ze	dd ZdS )r   zfsspec.spec.AbstractFileSystem	2024.10.0abstractr   r    zLiteral['', '/']r   /r   r   c                   s   t |tr fdd|D S t|}t  jtr jfn j}|D ]%}||d r5|t|d d }q!||d rF|t|d d }q!|d}|pP jS )	zTurn path from fully-qualified to file-system-specific

        May require FS-specific handling, e.g., for relative paths or links.
        c                      g | ]}  |qS r   r    .0pr   r   r   
<listcomp>f       z=AbstractFileSystemFlavour._strip_protocol.<locals>.<listcomp>://   N::   r6   )	r%   listr   r   r&   
startswithlenrstripr   r   r   protosr   r   r<   r   r    _   s   


z)AbstractFileSystemFlavour._strip_protocolc                 C  s   i S )af  If kwargs can be encoded in the paths, extract them here

        This should happen before instantiation of the class; incoming paths
        then should be amended to strip the options in methods.

        Examples may look like an sftp path "sftp://user@host:/my/path", where
        the user and host should become kwargs and later get stripped.
        r   r"   r   r   r   r#   r   s   z/AbstractFileSystemFlavour._get_kwargs_from_urlsc                 C  s:   |  |}d|v r|ddd | j}| j| S | jS )Nr6      r   )r    rsplitlstripr   )r   r   parentr   r   r   r$      s
   

z!AbstractFileSystemFlavour._parentN)r,   r-   r.   __orig_class____orig_version__r   r0   r   r   r1   r    r2   r#   r$   r   r   r   r   r   X   s   
 

r   c                   @  <   e Zd ZdZdZdZdZdZdZe	dd Z
e	dd	 Zd
S )AsyncLocalFileSystemFlavourz&morefs.asyn_local.AsyncLocalFileSystem0.2.2r   r6   Tc                 C  4  t |}|dr|dd  }n#|dr|dd  }n|dr(|dd  }n|dr3|dd  }t|}tjd	kr|d
d dkrR|d d |dd  }}n4|d d dkr|d	d }dksp|d	|d
  }dkrv|d}}n|d | ||d  }}nd}|d	p| j}|| S |d	p| jS Nzfile://   zfile:   zlocal://   zlocal:   r6   rI   rB   ://r5   r   rD   r   osr   findrF   r   r   r   driveindex1index2r   r   r   r       0   




z+AsyncLocalFileSystemFlavour._strip_protocolc                 C  d   |  |}tjdkr|ddd pdS |ddd }t|dkr0|dd dkr0|d d S |S Nr6   rI   r   r@   rB   rX   z:/r    r\   r   rJ   rE   r   r   path_r   r   r   r$         

z#AsyncLocalFileSystemFlavour._parentNr,   r-   r.   rM   rN   r   r   r   
local_filer1   r    r$   r   r   r   r   rP          
&rP   c                   @  s:   e Zd ZdZdZdZdZdZeddd	Z	e
d
d ZdS )AzureBlobFileSystemFlavourzadlfs.spec.AzureBlobFileSystem2024.7.0)abfsazabfssr5   r6   r   r&   c                   s   t |tr fdd|D S d}td|  |ds&|d}d| }t|}d|v r?|dd	r>|d |d
  |d
< n|dd	rX|d |dkrX|d |d
  |d
< |d}|d	url|d
  d| |d
< td| d|  |d
 d}|S )z
        Remove the protocol from the input path

        Parameters
        ----------
        path: str
            Path to remove the protocol from

        Returns
        -------
        str
            Returns a path without the protocol
        c                   r7   r   r8   r9   r<   r   r   r=      r>   z>AzureBlobFileSystemFlavour._strip_protocol.<locals>.<listcomp>z.dfs.core.windows.netz_strip_protocol for )abfs://zaz://zabfss://r6   rq   usernameNr   hostr   	url_query?z_strip_protocol(z) = )	r%   rC   loggerdebugrD   rK   r   getcount)r   r   STORE_SUFFIXopsrt   stripped_pathr   r<   r   r       s*   



z*AzureBlobFileSystemFlavour._strip_protocolc           	      C  sz   t | }i }|dd}|r td|}|r | d }||d< |d}|dur;ddlm} ||}d|v r;d	|d
< |S )zAGet the account_name from the urlpath and pass to storage_optionsrs   Nz4(?P<account_name>.+)\.(dfs|blob)\.core\.windows\.netaccount_namert   r   r   	versionidTversion_aware)r   rx   rematch	groupdicturllib.parser	   )	urlpathr{   outrs   r   r}   rt   r	   parsedr   r   r   r#      s"   
z0AzureBlobFileSystemFlavour._get_kwargs_from_urlsN)r   r&   r,   r-   r.   rM   rN   r   r   r   r1   r    r2   r#   r   r   r   r   rl      s    *rl   c                   @  8   e Zd ZdZdZdZdZdZedd Z	e
dd	 Zd
S )AzureDatalakeFileSystemFlavourz"adlfs.gen1.AzureDatalakeFileSystemrm   )adlr5   r6   c                 C  s   t |}|d S Nr   r   r   r   r{   r   r   r   r      s   z.AzureDatalakeFileSystemFlavour._strip_protocolc                 C  s(   t | }i }|ddr|d |d< |S )z?Get the store_name from the urlpath and pass to storage_optionsrs   N
store_name)r   rx   )pathsr{   r   r   r   r   r#     s
   z4AzureDatalakeFileSystemFlavour._get_kwargs_from_urlsNr   r   r   r   r   r     s    
r   c                      s6   e Zd ZdZdZdZdZdZed	 fddZ	  Z
S )
BoxFileSystemFlavourzboxfs.boxfs.BoxFileSystemz0.3.0)boxr6   returnr&   c                   s2   t  |}|dd}|| js| j| }|S )N\r6   )superr    replacerD   r   r   	__class__r   r   r    /  s
   
z$BoxFileSystemFlavour._strip_protocol)r   r&   r,   r-   r.   rM   rN   r   r   r   r1   r    __classcell__r   r   r   r   r   (      r   c                   @  ,   e Zd ZdZdZdZdZdZedd Z	dS )	DaskWorkerFileSystemFlavourz0fsspec.implementations.dask.DaskWorkerFileSystemr3   )daskr5   r6   c                 C  s6   t | }d|v rd|v rd|d  d|d  iS i S )Nrs   portclientrX   r   )r   sor   r   r   r#   @  s   z1DaskWorkerFileSystemFlavour._get_kwargs_from_urlsN
r,   r-   r.   rM   rN   r   r   r   r2   r#   r   r   r   r   r   9      r   c                   @      e Zd ZdZdZdZdZdZdS )DataFileSystemFlavourz*fsspec.implementations.data.DataFileSystemr3   )datar5   r6   Nr,   r-   r.   rM   rN   r   r   r   r   r   r   r   r   I      r   c                   @  r   )DatabricksFileSystemFlavourz0fsspec.implementations.dbfs.DatabricksFileSystemr3   )dbfsr5   r6   Nr   r   r   r   r   r   Q  r   r   c                   @  s.   e Zd ZdZdZdZdZdZedd	d
Z	dS )DictFSFlavourzmorefs.dict.DictFSrQ   )dictfsr5   r6   r   r&   r   c                 C  sV   | dr|tdd  }d|v sd|v r|dS |dd}|r(d| S | jS )Nz	dictfs://rA   r?   r6   )rD   rE   rF   rK   r   r   r   r   r   r    `  s   

zDictFSFlavour._strip_protocolNr   r&   r   r&   
r,   r-   r.   rM   rN   r   r   r   r1   r    r   r   r   r   r   Y  s    r   c                   @  r   )DropboxDriveFileSystemFlavourz*dropboxdrivefs.core.DropboxDriveFileSystemz1.4.1)dropboxr5   r6   Nr   r   r   r   r   r   j  r   r   c                   @  8   e Zd ZdZdZdZdZdZedd Z	e
dd Zd	S )
FTPFileSystemFlavourz(fsspec.implementations.ftp.FTPFileSystemr3   )ftpr6   c                 C  s   dt |d dd S )Nr6   r   )r   rK   rF   r   r   r   r   r    y  s   z$FTPFileSystemFlavour._strip_protocolc                 C  $   t | }|dd  |dd  |S Nr   r   r   popr   r   r   r   r   r#   }     z*FTPFileSystemFlavour._get_kwargs_from_urlsNr   r   r   r   r   r   r      
r   c                   @  sF   e Zd ZdZdZdZdZdZedd Z	edd	 Z
edddZdS )GCSFileSystemFlavourzgcsfs.core.GCSFileSystemr3   )gsgcsr5   r6   c                   s   t |tr fdd|D S t|}t  jtr jfn j}|D ]%}||d r5|t|d d  }q!||d rF|t|d d  }q!|pK jS )Nc                   r7   r   r8   r9   r<   r   r   r=     r>   z8GCSFileSystemFlavour._strip_protocol.<locals>.<listcomp>r?   r@   rA   rB   )r%   rC   r   r   r&   rD   rE   r   rG   r   r<   r   r      s   

z$GCSFileSystemFlavour._strip_protocolc                 C  s(   | j |dd\}}}|d urddiS i S )NT)r   r   )_split_path)r   r   _
generationr   r   r   r#     s   z*GCSFileSystemFlavour._get_kwargs_from_urlsFc           	      C  s   |  |d}d|vr|ddfS |dd\}}|}d}|rUt|}z&|jr+|j}n|jr=t|j}d|v r=|d d }|durHt| |j}W n t	yT   d}Y nw |||fS )aH  
        Normalise GCS path string into bucket and key.

        Parameters
        ----------
        path : string
            Input path, like `gcs://mybucket/path/to/file`.
            Path is of the form: '[gs|gcs://]bucket[/key][?querystring][#fragment]'

        GCS allows object generation (object version) to be specified in either
        the URL fragment or the `generation` query parameter. When provided,
        the fragment will take priority over the `generation` query paramenter.

        Returns
        -------
            (bucket, key, generation) tuple
        r6   r5   NrI   r   r   )
r    rK   splitr
   fragmentqueryr	   intr   r(   )	r   r   r   bucketkeypartkeyr   partsr   r   r   r   r     s4   

z GCSFileSystemFlavour._split_pathN)F)r,   r-   r.   rM   rN   r   r   r   r1   r    r#   r   r   r   r   r   r     s    

r   c                      @   e Zd ZdZdZdZdZdZe fddZ	e
dd	 Z  ZS )
GitFileSystemFlavourz(fsspec.implementations.git.GitFileSystemr3   )gitr5   r6   c                   sL   t  |d}d|v r|ddd }d|v r!|ddd }|dS )Nr6   rX   rI   @)r   r    rK   r   r   r   r   r   r      s   
z$GitFileSystemFlavour._strip_protocolc                 C  sV   |  dr| dd  } i }d| v r| dd\|d< } d| v r)| dd\|d< } |S )Nzgit://rW   rX   rI   r   r   ref)rD   r   r   r   r   r   r   r#     s   
z*GitFileSystemFlavour._get_kwargs_from_urlsr,   r-   r.   rM   rN   r   r   r   r1   r    r2   r#   r   r   r   r   r   r     s    r   c                      r   )
GithubFileSystemFlavourz.fsspec.implementations.github.GithubFileSystemr3   )githubr5   r6   c                   s*   t |}d|vrt |S |d dS )Nrr   r   r6   )r   r   r    rK   )r   r   optsr   r   r   r      s   z'GithubFileSystemFlavour._strip_protocolc                 C  s>   t | }d|vr
i S |d |d d}|d r|d |d< |S )Nrr   password)orgrepors   shar   )r   r   r   r   r   r   r#     s   z-GithubFileSystemFlavour._get_kwargs_from_urlsr   r   r   r   r   r     s    r   c                      s@   e Zd ZdZdZdZdZdZedd Z	e fdd	Z
  ZS )
HTTPFileSystemFlavourz*fsspec.implementations.http.HTTPFileSystemr3   )httphttpsr5   r6   c                 C  s   |S )z-For HTTP, we always want to keep the full URLr   r   r   r   r   r      s   z%HTTPFileSystemFlavour._strip_protocolc                   s    t  |}t|dkr|S dS )NrT   r5   )r   r$   rE   )r   r   parr   r   r   r$     s   zHTTPFileSystemFlavour._parentr,   r-   r.   rM   rN   r   r   r   r1   r    r$   r   r   r   r   r   r     s    
r   c                   @  r   )
HadoopFileSystemFlavourz-fsspec.implementations.arrow.HadoopFileSystemr3   )hdfs
arrow_hdfsr6   c                 C  s*   t |}|d }|dr|dd  }|S )Nr   rY   rI   )r   rD   r   r   r   r   r    #  s
   
z'HadoopFileSystemFlavour._strip_protocolc                 C  s   t | }i }|dd r|d |d< |dd r|d |d< |dd r*|d |d< |dd rFt|d }|dd rFt|d d |d< |S )Nrs   rr   userr   rt   replicationr   )r   rx   r	   r   )r   r{   r   queriesr   r   r   r#   ,  s   z-HadoopFileSystemFlavour._get_kwargs_from_urlsNr   r   r   r   r   r     s    
r   c                   @  r   )HfFileSystemFlavourz+huggingface_hub.hf_file_system.HfFileSystemz0.26.5)hfr5   r6   Nr   r   r   r   r   r   =  r   r   c                   @  r   )JupyterFileSystemFlavourz0fsspec.implementations.jupyter.JupyterFileSystemr3   )jupyterjlabr5   r6   Nr   r   r   r   r   r   E  r   r   c                      4   e Zd ZdZdZdZdZdZe fddZ	  Z
S )LakeFSFileSystemFlavourz!lakefs_spec.spec.LakeFSFileSystemz0.11.0)lakefsr5   r6   c                   sB   t |tr fdd|D S t |}t|dr|d S |S )z?Copied verbatim from the base class, save for the slash rstrip.c                   r7   r   r8   r9   r<   r   r   r=   X  r>   z;LakeFSFileSystemFlavour._strip_protocol.<locals>.<listcomp>r6   )r%   rC   r   r    r   endswith)r   r   spathr   r<   r   r    T  s   
z'LakeFSFileSystemFlavour._strip_protocolr   r   r   r   r   r   M      r   c                      r   )LibArchiveFileSystemFlavourz6fsspec.implementations.libarchive.LibArchiveFileSystemr3   )
libarchiver5   r6   c                      t  |dS Nr6   r   r    rK   r   r   r   r   r    f     z+LibArchiveFileSystemFlavour._strip_protocolr   r   r   r   r   r   _  r   r   c                   @  rO   )LocalFileSystemFlavourz,fsspec.implementations.local.LocalFileSystemr3   )filelocalr6   Tc                 C  rR   rS   r[   r^   r   r   r   r    t  rb   z&LocalFileSystemFlavour._strip_protocolc                 C  rc   rd   re   rf   r   r   r   r$     rh   zLocalFileSystemFlavour._parentNri   r   r   r   r   r   l  rk   r   c                   @  r   )	MemFSFlavourzmorefs.memory.MemFSrQ   )memfsr5   r6   c                 C  s$   | dr|tdd  }t|S )Nzmemfs://)rD   rE   MemoryFileSystemFlavourr    r   r   r   r   r      s   

zMemFSFlavour._strip_protocolNr   r   r   r   r   r     r   r   c                   @  s,   e Zd ZdZdZdZdZdZedd Z	dS )r   z.fsspec.implementations.memory.MemoryFileSystemr3   )memoryr6   c                 C  sz   t |trt |trt|S t|}|dr |tdd  }d|v s(d|v r-|dS |	dd}|r;d| S dS )Nz	memory://rA   r?   r6   r5   )
r%   r   r   r   r    r   rD   rE   rF   rK   r   r   r   r   r      s   




z'MemoryFileSystemFlavour._strip_protocolNr   r   r   r   r   r     r   r   c                      s@   e Zd ZdZdZdZdZdZe fddZ	edd	 Z
  ZS )
OCIFileSystemFlavourzocifs.core.OCIFileSystemz1.3.1)ociocilaker5   r6   c                   s`   t |tr fdd|D S t|}t |}| jkr.d|v r.d|dddd  S |S )Nc                   r7   r   r8   r9   r<   r   r   r=     r>   z8OCIFileSystemFlavour._strip_protocol.<locals>.<listcomp>r   r6   rI   )r%   rC   r   r   r    r   rF   r   )r   r   r|   r   r<   r   r      s   
z$OCIFileSystemFlavour._strip_protocolc                 C  s^   |  |d}d|v r| j|ddd  S d|v r(| jd |ddd  S td| )Nr6   rI   r   r   z1the following path does not specify a namespace: )r    rF   r   rJ   r   r(   r   r   r   r   r$     s   zOCIFileSystemFlavour._parentr   r   r   r   r   r     s    	r   c                   @  r   )	OSSFileSystemFlavourzossfs.core.OSSFileSystemz	2023.12.0)ossr5   r6   c                   sd   t |tr fdd|D S t|}|dr|dd }d}t||}|r-|d }|p1 jS )a0  Turn path from fully-qualified to file-system-specifi
        Parameters
        ----------
        path : Union[str, List[str]]
            Input path, like
            `http://oss-cn-hangzhou.aliyuncs.com/mybucket/myobject`
            `oss://mybucket/myobject`
        Examples
        --------
        >>> _strip_protocol(
            "http://oss-cn-hangzhou.aliyuncs.com/mybucket/myobject"
            )
        ('/mybucket/myobject')
        >>> _strip_protocol(
            "oss://mybucket/myobject"
            )
        ('/mybucket/myobject')
        c                   r7   r   r8   r9   r<   r   r   r=   	  r>   z8OSSFileSystemFlavour._strip_protocol.<locals>.<listcomp>zoss://rU   Nz6https?://(?P<endpoint>oss.+aliyuncs\.com)(?P<path>/.+)r   )r%   rC   r   rD   r   compiler   r   )r   r   path_string	parser_rematcherr   r<   r   r      s   


z$OSSFileSystemFlavour._strip_protocolNr   r   r   r   r   r     r   r   c                   @  r   )OverlayFileSystemFlavourz morefs.overlay.OverlayFileSystemrQ   )	overlayfsr5   r6   Nr   r   r   r   r   r    r   r  c                   @  r   )ReferenceFileSystemFlavourz4fsspec.implementations.reference.ReferenceFileSystemr3   )	referencer5   r6   Nr   r   r   r   r   r    r   r  c                   @  r   )	S3FileSystemFlavourzs3fs.core.S3FileSystemr3   )s3s3ar5   r6   c                 C  sF   t | }|d}i }|dur!ddlm} ||}d|v r!d|d< |S )z
        When we have a urlpath that contains a ?versionId=

        Assume that we want to use version_aware mode for
        the filesystem.
        rt   Nr   r   	versionIdTr   )r   rx   r   r	   )r   url_storage_optsrt   r   r	   r   r   r   r   r#   ,  s   
z)S3FileSystemFlavour._get_kwargs_from_urlsNr   r   r   r   r   r  %  r   r  c                   @  r   )SFTPFileSystemFlavourz*fsspec.implementations.sftp.SFTPFileSystemr3   )sftpsshr5   r6   c                 C     t |d S r   r   r   r   r   r   r    G     z%SFTPFileSystemFlavour._strip_protocolc                 C  r   r   r   r   r   r   r   r#   K  r   z+SFTPFileSystemFlavour._get_kwargs_from_urlsNr   r   r   r   r   r
  @  r   r
  c                   @  r   )SMBFileSystemFlavourz(fsspec.implementations.smb.SMBFileSystemr3   )smbr5   r6   c                 C  r  r   r   r   r   r   r   r    Z  r  z$SMBFileSystemFlavour._strip_protocolc                 C  r   r   r   r   r   r   r   r#   ^  s   z*SMBFileSystemFlavour._get_kwargs_from_urlsNr   r   r   r   r   r  S  r   r  c                   @  r   )TarFileSystemFlavourz(fsspec.implementations.tar.TarFileSystemr3   )tarr5   r6   Nr   r   r   r   r   r  g  r   r  c                   @  r   )WandbFSFlavourzwandbfs._wandbfs.WandbFSz0.0.2)wandbr5   r6   Nr   r   r   r   r   r  o  r   r  c                   @  r   )WebHDFSFlavourz&fsspec.implementations.webhdfs.WebHDFSr3   )webhdfswebHDFSr5   r6   c                 C  r  r   r   r   r   r   r   r    ~  r  zWebHDFSFlavour._strip_protocolc                 C  s:   t | }|dd  |dd  d|v r|d|d< |S )Nr   r   rr   r   r   r   r   r   r   r#     s   z$WebHDFSFlavour._get_kwargs_from_urlsNr   r   r   r   r   r  w  r   r  c                      s6   e Zd ZdZdZdZdZdZed fd	d
Z	  Z
S )WebdavFileSystemFlavourzwebdav4.fsspec.WebdavFileSystemz0.10.0)webdavdavr5   r6   r   r&   r   c                   s   t  |}tt|S )zAStrips protocol from the given path, overriding for type-casting.)r   r    r   r&   )r   r   strippedr   r   r   r      s   
z'WebdavFileSystemFlavour._strip_protocolr   r   r   r   r   r   r    r   r  c                   @  s<   e Zd ZdZdZdZdZdZedd	d
Z	e
dddZdS )XRootDFileSystemFlavourz%fsspec_xrootd.xrootd.XRootDFileSystemz0.4.0)rootr6   r   str | list[str]r   r   c                   sz   t |tr+| jr#t|}|jr|jd|j  nddp" jS |dp* jS t |t	r9 fdd|D S t
d)Nru   r5   r6   c                   r7   r   r8   )r:   itemr<   r   r   r=     r>   z;XRootDFileSystemFlavour._strip_protocol.<locals>.<listcomp>z'Strip protocol not given string or list)r%   r&   rD   r   r
   r   r   rF   r   rC   r(   )r   r   xr   r<   r   r      s   
0
z'XRootDFileSystemFlavour._strip_protocolur&   dict[Any, Any]c                 C  s   t | }d|jiS )Nhostid)r
   netloc)r!  urlr   r   r   r#     s   
z-XRootDFileSystemFlavour._get_kwargs_from_urlsN)r   r  r   r   )r!  r&   r   r"  r   r   r   r   r   r    s    r  c                      r   )ZipFileSystemFlavourz(fsspec.implementations.zip.ZipFileSystemr3   )zipr5   r6   c                   r   r   r   r   r   r   r   r      r   z$ZipFileSystemFlavour._strip_protocolr   r   r   r   r   r&    r   r&  c                   @  s    e Zd ZdZdZdZdZdZdS )_DVCFileSystemFlavourzdvc.fs.dvc._DVCFileSystemz3.58.0)dvcr6   Nr   r   r   r   r   r(    r   r(  )Ar/   
__future__r   loggingr\   r   pathlibr   r   typingr   r   r   r   r	   r
   fsspec.implementations.localr   fsspec.utilsr   r   __all__	getLoggerr,   rv   r   r0   r   r   rP   rl   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r
  r  r  r  r  r  r  r&  r(  r   r   r   r   <module>   sp    
1@IM!@(