o
    !2g                     @   sN   d dl mZ d dlmZ G dd deZeG dd deZdefdd	Zd
S )    )	dataclass)Typec                   @   s   e Zd ZdS )CachewExceptionN)__name__
__module____qualname__ r   r   D/home/garg/my-data/venv/lib/python3.10/site-packages/cachew/utils.pyr      s    r   c                   @   s$   e Zd ZU eed< defddZdS )TypeNotSupportedtype_returnc                 C   s   | j  dS )Nzm isn't supported by cachew. See https://github.com/karlicoss/cachew#features for the list of supported types.)r   )selfr   r   r	   __str__   s   zTypeNotSupported.__str__N)r   r   r   r   __annotations__strr   r   r   r   r	   r
   	   s   
 r
   r   c                 C   s`   t | dd }|d u rdS t|dks|d turdS t | dd }t|ts'dS tdd |D S )N	__bases__F   r   _fieldsc                 s   s    | ]	}t |tkV  qd S )N)typer   ).0nr   r   r	   	<genexpr>   s    z is_namedtuple.<locals>.<genexpr>)getattrlentuple
isinstanceall)tbfr   r   r	   is_namedtuple   s   
r    N)	dataclassesr   typingr   RuntimeErrorr   r
   boolr    r   r   r   r	   <module>   s    