o
    qoi                     @   sB   d dl mZmZmZ d dlmZ d dlmZ G dd dedZdS )    )AnyDictType)	Singleton)ConfigSourcec                   @   sr   e Zd ZU eeee f ed< dddZdee ddfddZ	d	edee fd
dZ
edededd fddZdS )SourcesRegistrytypesreturnNc                 C   s
   i | _ d S N)r   )self r   T/home/ubuntu/.local/lib/python3.10/site-packages/hydra/_internal/sources_registry.py__init__   s   
zSourcesRegistry.__init__type_c                 C   sD   |  }|| jv r| j| j|jkrt| dd S || j|< d S )Nz- is already registered with a different class)schemer   __name__
ValueError)r   r   r   r   r   r   register   s   
zSourcesRegistry.registerr   c                 C   s>   || j vrdt| j  }td| d| d| j | S )Nz, z'No config source registered for schema z, supported types : [])r   joinsortedkeysr   )r   r   	supportedr   r   r   resolve   s   

zSourcesRegistry.resolveargskwargsc                  O   s   t jtg| R i |S r
   )r   instancer   )r   r   r   r   r   r   "   s   zSourcesRegistry.instance)r	   N)r   
__module____qualname__r   strr   r   __annotations__r   r   r   staticmethodr   r   r   r   r   r   r      s   
 
r   )	metaclassN)	typingr   r   r   hydra.core.singletonr   hydra.plugins.config_sourcer   r   r   r   r   r   <module>   s   