o
    QDi                     @  s   d dl mZ d dlmZmZ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 er6dd
lmZ G dd de
ZdS )    )annotations)TYPE_CHECKINGAnyOptional   )helpers)platform)Plugin   )
ZipAdapter)
ZipControl)Controlc                   @  s$   e Zd ZdZdddddddZdS )	ZipPluginzPlugin for ZipNF)controlbasepath	packagifysourcer   r   Optional[Control]r   Optional[str]r   boolc          
      C  s   t |tsd S tj||d}t|\}}|dkrd S |sJt|r$d S tj|d}d|	 vr;	 W d    d S W d    n1 sEw   Y  t |t
rQ|nt
 }t||d}	|	S )N)r   ziprzdatapackage.json)r   )
isinstancestrr   join_basepathparse_scheme_and_formatis_remote_pathr   zipfileZipFilenamelistr   r   )
selfr   r   r   r   fullpath_formatr   adapter r%   X/var/www/Datamplify/venv/lib/python3.10/site-packages/frictionless/formats/zip/plugin.pycreate_adapter   s$   

zZipPlugin.create_adapter)r   r   r   r   r   r   r   r   )__name__
__module____qualname____doc__r'   r%   r%   r%   r&   r      s    r   N)
__future__r   typingr   r   r    r   r   systemr	   r$   r   r   r   dialectr   r   r%   r%   r%   r&   <module>   s    