o
    ̳i
                     @   sT   d dl Z d dlmZmZ d dlmZ d dlmZ ededZG dd dee Z	dS )	    N)GenericTypeVar)ResourceHandle)register_datasource_accessT)boundc                   @   s   e Zd ZdZejZ	dddddededB de	dB dedB d	e
eedB f f
d
dZej	dddddededB de	dB dedB d	e
eedB f f
ddZejddededB d	e	fddZdS )Resolverz;Resolver base class: all resolvers inherit from this class.NFforce_download
output_dirhandlepathr
   r   returnc                C   s(   | j ||||d\}}t|| ||fS )  Resolves a handle into a path with the requested file(s) and the resource's version number.

        Args:
            handle: (T) the ResourceHandle to resolve.
            path: (string) Optional path to a file within the resource.
            force_download: (bool) Optional flag to force download, even if it's cached or already in output_dir.
            output_dir: (string) Optional output directory for direct download, bypassing the default cache.

        Returns:
            A tuple of: (string representing the path, version number of resolved datasource if present)
            Some cases where version number might be missing: Competition datasource, API-based models.
        r	   )_resolver   )selfr   r   r
   r   version r   F/home/ubuntu/.local/lib/python3.10/site-packages/kagglehub/resolver.py__call__   s   

zResolver.__call__c                C      dS )r   Nr   )r   r   r   r
   r   r   r   r   r   /   s   zResolver._resolvec                 C   r   )zBReturns whether the current environment supports this handle/path.Nr   )r   r   r   r   r   r   is_supportedF   s   zResolver.is_supported)N)__name__
__module____qualname____doc__abcABCMeta__metaclass__r   strbooltupleintr   abstractmethodr   r   r   r   r   r   r   
   sH    
 "r   )
r   typingr   r   kagglehub.handler   kagglehub.trackerr   r   r   r   r   r   r   <module>   s    