HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/pydantic/__pycache__/annotated_handlers.cpython-310.pyc
o

|��g7�@s�dZddlmZddlmZmZmZddlm	Z	er6ddl
mZddlm
Z
mZee	je	je	je	je	jfZdZGd	d
�d
�ZGdd�d�Zd
S)z_Type annotations to use with `__get_pydantic_core_schema__` and `__get_pydantic_json_schema__`.�)�annotations)�
TYPE_CHECKING�Any�Union)�core_schema�)�NamespacesTuple)�JsonSchemaMode�JsonSchemaValue)�GetJsonSchemaHandler�GetCoreSchemaHandlerc@s.eZdZUdZded<ddd	�Zddd�Zd
S)rz�Handler to call into the next JSON schema generation function.

    Attributes:
        mode: Json schema mode, can be `validation` or `serialization`.
    r	�moder�CoreSchemaOrField�returnr
cC�t�)aCall the inner handler and get the JsonSchemaValue it returns.
        This will call the next JSON schema modifying function up until it calls
        into `pydantic.json_schema.GenerateJsonSchema`, which will raise a
        `pydantic.errors.PydanticInvalidForJsonSchema` error if it cannot generate
        a JSON schema.

        Args:
            core_schema: A `pydantic_core.core_schema.CoreSchema`.

        Returns:
            JsonSchemaValue: The JSON schema generated by the inner JSON schema modify
            functions.
        ��NotImplementedError)�selfr�r�F/usr/local/lib/python3.10/dist-packages/pydantic/annotated_handlers.py�__call__!�zGetJsonSchemaHandler.__call__�maybe_ref_json_schemacCr)a�Get the real schema for a `{"$ref": ...}` schema.
        If the schema given is not a `$ref` schema, it will be returned as is.
        This means you don't have to check before calling this function.

        Args:
            maybe_ref_json_schema: A JsonSchemaValue which may be a `$ref` schema.

        Raises:
            LookupError: If the ref is not found.

        Returns:
            JsonSchemaValue: A JsonSchemaValue that has no `$ref`.
        r)rrrrr�resolve_ref_schema1rz'GetJsonSchemaHandler.resolve_ref_schemaN)rrrr
)rr
rr
)�__name__�
__module__�__qualname__�__doc__�__annotations__rrrrrrrs


rc@sFeZdZdZddd�Zddd	�Zddd�Zeddd��Zddd�Z	dS)rzDHandler to call into the next CoreSchema schema generation function.�source_typerr�core_schema.CoreSchemacCr)a�Call the inner handler and get the CoreSchema it returns.
        This will call the next CoreSchema modifying function up until it calls
        into Pydantic's internal schema generation machinery, which will raise a
        `pydantic.errors.PydanticSchemaGenerationError` error if it cannot generate
        a CoreSchema for the given source type.

        Args:
            source_type: The input type.

        Returns:
            CoreSchema: The `pydantic-core` CoreSchema generated.
        r�rrrrrrE�
zGetCoreSchemaHandler.__call__cCr)a�Generate a schema unrelated to the current context.
        Use this function if e.g. you are handling schema generation for a sequence
        and want to generate a schema for its items.
        Otherwise, you may end up doing something like applying a `min_length` constraint
        that was intended for the sequence itself to its items!

        Args:
            source_type: The input type.

        Returns:
            CoreSchema: The `pydantic-core` CoreSchema generated.
        rr!rrr�generate_schemaTr"z$GetCoreSchemaHandler.generate_schema�maybe_ref_schemacCr)a�Get the real schema for a `definition-ref` schema.
        If the schema given is not a `definition-ref` schema, it will be returned as is.
        This means you don't have to check before calling this function.

        Args:
            maybe_ref_schema: A `CoreSchema`, `ref`-based or not.

        Raises:
            LookupError: If the `ref` is not found.

        Returns:
            A concrete `CoreSchema`.
        r)rr$rrrrcrz'GetCoreSchemaHandler.resolve_ref_schema�
str | NonecCr)z4Get the name of the closest field to this validator.r�rrrr�
field_namesszGetCoreSchemaHandler.field_namercCr)zGInternal method used during type resolution for serializer annotations.rr&rrr�_get_types_namespacexsz)GetCoreSchemaHandler._get_types_namespaceN)rrrr )r$r rr )rr%)rr)
rrrrrr#r�propertyr'r(rrrrrBs


rN)r�
__future__r�_annotations�typingrrr�
pydantic_corer�_internal._namespace_utilsr�json_schemar	r
�
CoreSchema�
ModelField�DataclassField�TypedDictField�
ComputedFieldr�__all__rrrrrr�<module>s$��*