o
    ¨Ýjd  ã                   @  s`   d dl mZ d dlmZ d dlmZ d dlmZmZ g d¢Z	ej
Z
G dd„ deƒZddd„ZdS )é    )Úannotations)Ú	TypedDict)Ú_schema_gather)Ú
CoreSchemaÚDefinitionReferenceSchema)ÚGatherResultÚMissingDefinitionErrorÚgather_schemas_for_cleaningc                   @  s$   e Zd ZU dZded< 	 ded< dS )r   zSchema traversing result.z+dict[str, DefinitionReferenceSchema | None]Úcollected_referenceszlist[CoreSchema]Údeferred_discriminator_schemasN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__© r   r   ú\/var/www/html/chatgpt/venv/lib/python3.10/site-packages/pydantic/_internal/_schema_gather.pyr      s   
 r   Úschemar   Údefinitionsúdict[str, CoreSchema]Úreturnc                 C  s   t  | |¡\}}||dœS )a]  Traverse the core schema and definitions and return the necessary information for schema cleaning.

    During the core schema traversing, any `'definition-ref'` schema is:

    - Validated: the reference must point to an existing definition. If this is not the case, a
      `MissingDefinitionError` exception is raised.
    - Stored in the context: the actual reference is stored in the context. Depending on whether
      the `'definition-ref'` schema is encountered more that once, the schema itself is also
      saved in the context to be inlined (i.e. replaced by the definition it points to).
    )r
   r   )r   r	   )r   r   r
   r   r   r   r   r	       s   ÿþr	   N)r   r   r   r   r   r   )Ú
__future__r   Útypingr   Zpydantic_core._pydantic_corer   Zpydantic_core.core_schemar   r   Ú__all__r   r   r	   r   r   r   r   Ú<module>   s    