
    Tg.                       d Z ddlmZ ddlZddlmZ ddlmZmZm	Z	 ddl
mZ ddlmZmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ dd	l0m1Z1 dd
l2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8 ddl9m:Z: ddl;m<Z< ddl=m>Z> ddl?m@Z@ ddlAmBZB ddlCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZM ddlNmOZO ddlPmQZQ ddlRmSZT ddlUmVZV ddlWmXZX dZYdZZdZ[dZ\dZ]dZ^dZ_dZ`dZah dZb eXeT          Zcd Zdd!ZSded&Ze G d' d(e6          Zf G d) d*          Zgdfd.Zh G d/ d0          Zi G d1 d2          Zj G d3 d4          Zk G d5 d6          Zl ed7d8d9          Zm ed:d;d9          Zn ed<d=d9          Zo ed>d?d9          Zp ed@dAd9          Zq ed@dBd9          Zr ed@dCd9          ZsdgdJZtdhdMZudidNZvdjdQZwdidRZxdkdSZy	 	 	 dldmdaZzdnddZ{dS )oz^This module includes classes and functions designed specifically for use with the mypy plugin.    )annotationsN)ConfigParser)AnyCallableIterator)	ErrorCode)expand_typeexpand_type_by_instance) 	ARG_NAMEDARG_NAMED_OPTARG_OPTARG_POS	ARG_STAR2	INVARIANTMDEFArgumentAssignmentStmtBlockCallExprClassDefContext	DecoratorDictExprEllipsisExpr
ExpressionFuncDefIfStmtJsonDict
MemberExprNameExprPassStmtPlaceholderNodeRefExpr	StatementStrExprSymbolTableNodeTempNode	TypeAliasTypeInfoVar)Options)CheckerPluginInterfaceClassDefContextMethodContextPluginReportConfigContextSemanticAnalyzerPluginInterface)deserialize_and_fixup_type)set_callable_name)make_wildcard_trigger)state)map_type_from_supertype)
AnyTypeCallableTypeInstanceNoneTypeType	TypeOfAnyTypeTypeTypeVarType	UnionTypeget_proper_type)fill_typevars)get_unique_redefinition_name)__version__)_fields)parse_mypy_versionpydantic-mypyzpydantic-mypy-metadatazpydantic.main.BaseModelz#pydantic_settings.main.BaseSettingszpydantic.root_model.RootModelz5pydantic._internal._model_construction.ModelMetaclasszpydantic.fields.Fieldzpydantic.dataclasses.dataclass.pydantic.functional_validators.model_validator>   *pydantic.functional_serializers.serializer.pydantic.deprecated.class_validators.validator.pydantic.functional_validators.field_validator0pydantic.functional_serializers.model_serializer3pydantic.deprecated.class_validators.root_validatorrG   builtins   versionstrreturntype[Plugin]c                    t           S )a!  `version` is the mypy version string.

    We might want to use this to print a warning if the mypy version being used is
    newer, or especially older, than we expect (or need).

    Args:
        version: The mypy version string.

    Return:
        The Pydantic mypy plugin type.
    )PydanticPlugin)rO   s    B/var/www/sysmax/venv/lib/python3.11/site-packages/pydantic/mypy.pypluginrV   j   s
         c                  T     e Zd ZdZd fdZdd
ZddZddZddZddZ	ddZ
 xZS )rT   zThe Pydantic mypy plugin.optionsr+   rQ   Nonec                    t          |          | _        | j                                        | _        t	                                          |           d S N)PydanticPluginConfigplugin_configto_data_plugin_datasuper__init__)selfrY   	__class__s     rU   rb   zPydanticPlugin.__init__|   sH    1':: .6688!!!!!rW   fullnamerP   (Callable[[ClassDefContext], None] | Nonec                    |                      |          }|rDt          |j        t                    r*t	          d |j        j        D                       r| j        S dS )zUpdate Pydantic model class.c              3  6   K   | ]}|j         t          k    V  d S r\   re   BASEMODEL_FULLNAME.0bases     rU   	<genexpr>z5PydanticPlugin.get_base_class_hook.<locals>.<genexpr>   s*      PP44=$66PPPPPPrW   N)lookup_fully_qualified
isinstancenoder)   anymro$_pydantic_model_class_maker_callback)rc   re   syms      rU   get_base_class_hookz"PydanticPlugin.get_base_class_hook   sd    ))(33 	A:ch11 	APP38<PPPPP A@@trW   c                *    |t           k    r| j        S dS )z,Update Pydantic `ModelMetaclass` definition.N)MODEL_METACLASS_FULLNAME)_pydantic_model_metaclass_marker_callbackrc   re   s     rU   get_metaclass_hookz!PydanticPlugin.get_metaclass_hook   s    ///AAtrW   &Callable[[MethodContext], Type] | Nonec                >    |                     d          rt          S dS )z-Adjust return type of `from_orm` method call.z	.from_ormN)endswithfrom_attributes_callbackrz   s     rU   get_method_hookzPydanticPlugin.get_method_hook   s#    [)) 	,++trW   ctxr0   dict[str, Any]c                    | j         S )zjReturn all plugin config data.

        Used by mypy to determine if cache needs to be discarded.
        )r`   )rc   r   s     rU   report_config_dataz!PydanticPlugin.report_config_data   s    
   rW   r-   c                z    t          |j        |j        |j        | j                  }|                                 d S r\   )PydanticModelTransformerclsreasonapir^   	transform)rc   r   transformers      rU   rt   z3PydanticPlugin._pydantic_model_class_maker_callback   s6    .sw
CGTM_``rW   c                    | j         j        rdS |j        j        j        }|s
J d            t          |j        dd          rd|j        _        dS dS )zReset dataclass_transform_spec attribute of ModelMetaclass.

        Let the plugin handle it. This behavior can be disabled
        if 'debug_dataclass_transform' is set to True', for testing purposes.
        Nz-callback not passed from 'get_metaclass_hook'dataclass_transform_spec)r^   debug_dataclass_transformr   infodeclared_metaclassgetattrtyper   )rc   r   info_metaclasss      rU   ry   z8PydanticPlugin._pydantic_model_metaclass_marker_callback   sn     7 	F8NNNNNN>&(BDII 	@;?N888	@ 	@rW   rY   r+   rQ   rZ   )re   rP   rQ   rf   )re   rP   rQ   r|   )r   r0   rQ   r   )r   r-   rQ   rZ   )__name__
__module____qualname____doc__rb   rv   r{   r   r   rt   ry   __classcell__)rd   s   @rU   rT   rT   y   s        ##" " " " " "
         ! ! ! !       @ @ @ @ @ @ @ @rW   rT   c                  P    e Zd ZU dZdZded<   ded<   ded<   ded<   ddZddZdS )r]   a  A Pydantic mypy plugin config holder.

    Attributes:
        init_forbid_extra: Whether to add a `**kwargs` at the end of the generated `__init__` signature.
        init_typed: Whether to annotate fields in the generated `__init__`.
        warn_required_dynamic_aliases: Whether to raise required dynamic aliases error.
        debug_dataclass_transform: Whether to not reset `dataclass_transform_spec` attribute
            of `ModelMetaclass` for testing purposes.
    )init_forbid_extra
init_typedwarn_required_dynamic_aliasesr   boolr   r   r   r   rY   r+   rQ   rZ   c                   |j         d S t          |j                   }||                    di                               di           }| j        D ]P}|                    |d          }t	          |t
                    st          d|           t          | ||           Qd S t                      }|	                    |j                    | j        D ]0}|
                    t          |d          }t          | ||           1d S )NtoolrF   Fz/Configuration value must be a boolean for key: )fallback)config_file
parse_tomlget	__slots__rp   r   
ValueErrorsetattrr   read
getbooleanCONFIGFILE_KEY)rc   rY   toml_configconfigkeysettingr^   s          rU   rb   zPydanticPluginConfig.__init__   s$   &F !455" __VR0044_bIIF~ , , **S%00!'400 ^$%\WZ%\%\]]]c7++++	, , )NNMw2333~ , ,'22>3QV2WWc7++++, ,rW   r   c                *      fd j         D             S )z/Returns a dict of config names to their values.c                2    i | ]}|t          |          S  )r   )rl   r   rc   s     rU   
<dictcomp>z0PydanticPluginConfig.to_data.<locals>.<dictcomp>   s%    BBBCWT3''BBBrW   )r   rc   s   `rU   r_   zPydanticPluginConfig.to_data   s    BBBB4>BBBBrW   Nr   rQ   r   )r   r   r   r   r   __annotations__rb   r_   r   rW   rU   r]   r]      s          I ''''####, , , ,&C C C C C CrW   r]   r   r.   r;   c                   | j         }t          |t                    r|j        }t          |t                    r"t          |j        t                    r|j        }nMt          |t                    r|}n5d| d|j        j         d}t          || j
        | j                   | j        S |j         j                            t                    }|| j        S t!          d |j         j        D                       s| j        S |                    di                               d          }|dur%t%          |j         j        | j
        | j                   | j        S )	z1Raise an error if from_attributes is not enabled.z
ctx.type: 
 (of type )Nc              3  6   K   | ]}|j         t          k    V  d S r\   ri   rk   s     rU   rn   z+from_attributes_callback.<locals>.<genexpr>   s*      SStt} 22SSSSSSrW   r   from_attributesT)r   rp   r=   itemr8   ret_typer9   rd   r   error_unexpected_behaviorr   contextdefault_return_typemetadatar   METADATA_KEYrr   rs   error_from_attributesname)r   ctx_type
model_typedetailpydantic_metadatar   s         rU   r   r      sR    xH(H%% !=(L)) 'j9JH.U.U '&

	Hh	'	' '

PhPP(2D2MPPP!&#'3;???&&"044\BB &&SSz?RSSSSS '&&'++Hb99==>OPPOd""jo2CGS[III""rW   c                  b    e Zd ZdZd,dZd-dZ	 d.d/d!Z	 d.d0d#Zd1d%Ze	d2d'            Z
d3d*Zd+S )4PydanticModelFieldz5Based on mypy.plugins.dataclasses.DataclassAttribute.r   rP   alias
str | None	is_frozenr   has_dynamic_aliashas_defaultstrictbool | Nonelineintcolumnr   Type | Noner   r)   c                    || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        d S r\   )
r   r   r   r   r   r   r   r   r   r   )rc   r   r   r   r   r   r   r   r   r   r   s              rU   rb   zPydanticModelField.__init__   sP     	
"!2&					rW   current_infotypedmodel_strictforce_optional	use_aliasr   r1   force_typevars_invariantis_root_model_rootrQ   r   c	                   |                      ||||          }	| j        |n| j        }
|s|
r|                     ||          }nt          t          j                  }t          |	|d|rt          n|s| j        rt          nt                    S )zABased on mypy.plugins.dataclasses.DataclassAttribute.to_argument.N)variabletype_annotationinitializerkind)to_varr   r	   r7   r<   explicitr   r   r   r   r   )rc   r   r   r   r   r   r   r   r   r   r   r   s               rU   to_argumentzPydanticModelField.to_argument  s     ;;|S)=UVV!%!4$+ 	:F 	:"..|SAAOO%i&899O+!V#1TT5ET--9
 
 
 	
rW   Fc                $   |rFt          | j        t                    r,| j                                        }t          |_        || _        | j        | j        j        t          j	        |j
        j                  5  t          |          }t          |t                    sJ |r+|j        D ]#}t          |t                    rt          |_        $t          | j        | j        j        j        |i          cddd           S # 1 swxY w Y   | j        S )zABased on mypy.plugins.dataclasses.DataclassAttribute.expand_type.N)rp   r   r>   copy_modifiedr   variancer   	self_typer5   strict_optional_setrY   strict_optionalrA   r9   argsr	   id)rc   r   r   r   modified_typefilled_with_typevarsargs          rU   r	   zPydanticModelField.expand_type/  sZ    $ 	*
 $)[11 * $	 7 7 9 9)2&)	9 TY%8%D
 *3;+FGG ^ ^'4\'B'B$!"6AAAAA+ 538 5 5%c;77 5+4CL"49ty/B/EG[.\]]^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ys   :A9D  DDr*   c                |    |r| j         | j         }n| j        }t          ||                     |||                    S )z<Based on mypy.plugins.dataclasses.DataclassAttribute.to_var.)r   r   r*   r	   )rc   r   r   r   r   r   s         rU   r   zPydanticModelField.to_varM  sF      	/:DD9D4)),=UVVWWWrW   r   c           
         | j         sJ | j        | j        | j        | j        | j        | j        | j        | j        | j         	                                d	S )?Based on mypy.plugins.dataclasses.DataclassAttribute.serialize.)	r   r   r   r   r   r   r   r   r   )
r   r   r   r   r   r   r   r   r   	serializer   s    rU   r   zPydanticModelField.serialize\  sZ    yIZ!%!7+kIkI''))

 

 
	
rW   datac                    |                                 }t          |                    d          |          } | d||d|S )ABased on mypy.plugins.dataclasses.DataclassAttribute.deserialize.r   )r   r   r   )copyr2   pop)r   r   r   r   typs        rU   deserializezPydanticModelField.deserializek  sI     yy{{(&)9)93??s/$//$///rW   sub_typerZ   c                    | j         Yt          j        |j        j                  5  t          | j         || j                  | _         ddd           dS # 1 swxY w Y   dS dS )zxExpands type vars in the context of a subtype when an attribute is inherited
        from a generic super type.
        N)r   r5   r   rY   r   r6   r   )rc   r   r   s      rU   expand_typevar_from_subtypez.PydanticModelField.expand_typevar_from_subtyper  s     9 *3;+FGG T T3DIxSS	T T T T T T T T T T T T T T T T T T ! s   !AAAN)r   rP   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r)   )r   r)   r   r   r   r   r   r   r   r   r   r1   r   r   r   r   rQ   r   F)r   r)   r   r1   r   r   rQ   r   )
r   r)   r   r1   r   r   r   r   rQ   r*   rQ   r   )r   r)   r   r   r   r1   rQ   r   )r   r)   r   r1   rQ   rZ   )r   r   r   r   rb   r   r	   r   r   classmethodr   r   r   rW   rU   r   r      s        ??   0
 
 
 
< ns    F */X X X X X
 
 
 
 0 0 0 [0T T T T T TrW   r   c                  8    e Zd ZdZd Zed	d            Zd
dZdS )PydanticModelClassVarzBased on mypy.plugins.dataclasses.DataclassAttribute.

    ClassVars are ignored by subclasses.

    Attributes:
        name: the ClassVar name
    c                    || _         d S r\   r   )rc   r   s     rU   rb   zPydanticModelClassVar.__init__  s    			rW   r   r   rQ   c                :    |                                 } | di |S )r   r   )r   )r   r   s     rU   r   z!PydanticModelClassVar.deserialize  s#     yy{{s{{T{{rW   c                    d| j         iS )r   r   r  r   s    rU   r   zPydanticModelClassVar.serialize  s     DI
 	
rW   N)r   r   rQ   r  r   )r   r   r   r   rb   r   r   r   r   rW   rU   r  r  {  sa               [

 
 
 
 
 
rW   r  c                     e Zd ZU dZh dZded<   dLdZdMdZdNdZdOdZ	dPdZ
dQdZdRdZdSd$ZdTd,ZdUd1ZdUd2ZdVd4ZdWdXd:ZedYd;            ZedZd=            Zed[d?            ZedYd@            Z	 dWd\dGZd]dHZed^dJ            ZdKS )_r   zTransform the BaseModel subclass according to the plugin settings.

    Attributes:
        tracked_config_fields: A set of field configs that the plugin has to track their value.
    >   extrafrozenr   alias_generatorr   populate_by_namezset[str]tracked_config_fieldsr   r   r   Expression | Statementr   r1   r^   r]   rQ   rZ   c                >    || _         || _        || _        || _        d S r\   )_cls_reason_apir^   )rc   r   r   r   r^   s        rU   rb   z!PydanticModelTransformer.__init__  s'     		*rW   r   c                |   | j         j        }t          d |j        dd         D                       }|                                 }|                     ||          \  }}||dS |D ]}|j         dS t          d |j        dd         D                       }|                     ||||           |                     ||||           | 	                    || j
        |j        du            |                                  d |D             d	 |D             |                                d
|j        t          <   dS )a  Configures the BaseModel subclass according to the plugin settings.

        In particular:

        * determines the model config and fields,
        * adds a fields-aware signature for the initializer and construct methods
        * freezes the class if frozen = True
        * stores the fields, config, and if the class is settings in the mypy metadata for access by subclasses
        c              3  2   K   | ]}t           |j        v V  d S r\   )ROOT_MODEL_FULLNAMEre   rk   s     rU   rn   z5PydanticModelTransformer.transform.<locals>.<genexpr>  s*      [[T/4=@[[[[[[rW   NFc              3  6   K   | ]}|j         t          k    V  d S r\   )re   BASESETTINGS_FULLNAMErk   s     rU   rn   z5PydanticModelTransformer.transform.<locals>.<genexpr>  s*      [[T$-+@@[[[[[[rW   T)r	  c                B    i | ]}|j         |                                S r   r   r   )rl   fields     rU   r   z6PydanticModelTransformer.transform.<locals>.<dictcomp>  s&    IIIuz5??#4#4IIIrW   c                B    i | ]}|j         |                                S r   r  )rl   	class_vars     rU   r   z6PydanticModelTransformer.transform.<locals>.<dictcomp>  s(    ]]]Y9>9+>+>+@+@]]]rW   )fields
class_varsr   )r  r   rr   rs   collect_configcollect_fields_and_class_varsr   add_initializeradd_model_construct_method
set_frozenr  r	  adjust_decorator_signaturesget_values_dictr   r   )rc   r   is_root_modelr   r  r  r  is_settingss           rU   r   z"PydanticModelTransformer.transform  st    y~[[TXVYWYVY][[[[[$$&&!??VV
>Z/5 	 	Ez!uu " [[TXVYWYVY][[[[[VV[-HHH'']SSS	&-42GHHH((*** JI&III]]R\]]],,..'
 '
l# trW   c                   | j         j        j                                        D ]}t	          |j        t                    r|j        j        d         t	          t                    rt	          j	        t                    rfj	        j        t          v rSj	        j        t          k    r-t          fdt          j                  D                       sd|j        j        _        dS )a  When we decorate a function `f` with `pydantic.validator(...)`, `pydantic.field_validator`
        or `pydantic.serializer(...)`, mypy sees `f` as a regular method taking a `self` instance,
        even though pydantic internally wraps `f` with `classmethod` if necessary.

        Teach mypy this by marking any function whose outermost decorator is a `validator()`,
        `field_validator()` or `serializer()` call as a `classmethod`.
        r   c              3     K   | ]8\  }}j         |         d k    ot          |t                    o
|j        dk    V  9dS )modeafterN)	arg_namesrp   r%   value)rl   ir   	first_decs      rU   rn   zGPydanticModelTransformer.adjust_decorator_signatures.<locals>.<genexpr>  sg           &3 &/2f<rCQXAYAYr^a^gkr^r           rW   TN)r  r   namesvaluesrp   rq   r   original_decoratorsr   calleer    re   DECORATOR_FULLNAMESMODEL_VALIDATOR_FULLNAMErr   	enumerater   funcis_class)rc   ru   r/  s     @rU   r$  z4PydanticModelTransformer.adjust_decorator_signatures  s     9>'..00 	2 	2C#(I.. 2H8;	y(332"9#3X>>2 "(15HHH "(15MMM        *3IN*C*C        N .2CHM*#	2 	2rW   ModelConfigDatac           	        | j         }t                      }d}d}|j                                        D ]4\  }}|                     ||          }|rd}|                    |           5d}|j        j        D ]}t          |t          t          f          s t          |t                    r|j        d         }	t          |	t                    r|	j        dk    rdt          |j        t                    rZt!          |j        j        |j        j                  D ]3\  }
}|
|                    |                     |
|d                     4nt          |j        t&                    rV|j        j        D ]I\  }}t          |t(                    s|                    |                     |j        |                     Jnt          |t                    r|j        dk    rk|j        j        D ]n}t          |t                    s|j        d         }	t          |	t                    s;|                    |                     |	j        |j                             o|r| j                            d|            nd}	|s|r1|r/|j        r(|j        s!| j        j        rt9          | j        |           |j        j        d	d         D ]}t>          |j         vr| j        !                    tE          |j#                             |j         t>                   d
                                         D ]\  }}|$                    ||           |S )zhCollects the values of the config attributes that are used by the plugin, accounting for parent classes.FTNr   model_config)	lax_extraConfigzYSpecifying config in two places is ambiguous, use either Config attribute or class kwargs   r   )%r  r9  keywordsitemsget_config_updateupdatedefsbodyrp   r   r   lvaluesr    r   rvaluer   zipr,  r   r   r%   r-  r  failhas_alias_generatorr  r^   r   error_required_dynamic_aliasesr   rs   r   r   add_plugin_dependencyr4   re   
setdefault)rc   r   r   has_config_kwargshas_config_from_namespacer   exprconfig_datastmtlhsarg_namer   key_expr
value_exprsubstmtr   r-  s                    rU   r  z'PydanticModelTransformer.collect_config  s   i ""!$)! ,,,.. 	+ 	+JD$00t<<K +$(!k*** "&HM &	- &	-Dd^X$>?? $// Tl1o!#x00 CH4N4Ndk844 	Z),T[-BDKDT)U)U ] ]##+$d&<&<XsVZ&<&[&[\\\\]  X66 Z040A Z Z,*)(G<< %$d&<&<X^Z&X&XYYYYD(++ 	T9((#y~ T TG%g~>> ! !/!,C%c844 ! MM$"8"87>"R"RSSSS  	o   (,%% 	@ 9 	@@.@ /@ &D	@ /ty$???HL$ 	/ 	/D4=00 I++,A$-,P,PQQQ#}\:8DJJLL / /e!!$..../rW   r;  r&  Jtuple[list[PydanticModelField] | None, list[PydanticModelClassVar] | None]c                   | j         }i }i }t          |j        j        dd                   D ]c}t          |j        vr| j                            t          |j	                             |j        t                   d         
                                D ]\  }}t                              ||| j                  }	|	                    |j        | j                   |	||<   |j        j                            |          }
|
rA|
j        r:t#          |
j        t$                    s | j                            d|
j                   |j        t                   d         
                                D ]"\  }}t(                              |          ||<   #et+                      }t+                      }|                     |j                  D ]}|                     |||          }||j        d         }t#          |t4                    sJ t#          |t                    rH|r!|j        dk    rt9          | j        |           x|                    |j                   |||j        <   t#          |t(                    r$|                    |j                   |||j        <   t=          |                                          t=          |                                          fS )	zACollects the fields for the model, accounting for parent classes.r>  r  r  z7BaseModel field may only be overridden by another fieldr  Nr   root) r  reversedr   rs   r   r   r  rK  r4   re   r@  r   r   r   r0  r   rq   rp   r*   rH  r  set%_get_assignment_statements_from_blockrC  $collect_field_or_class_var_from_stmtrE  r    r    error_extra_fields_on_root_modeladdlistr1  )rc   r;  r&  r   found_fieldsfound_class_varsr   r   r   r  sym_nodecurrent_field_namescurrent_class_vars_namesrQ  maybe_fieldrR  s                   rU   r   z6PydanticModelTransformer.collect_fields_and_class_vars<  s    i 79=?SX\!B$/00 	Q 	QD 4=00 I++,A$-,P,PQQQ"mL9(CIIKK  
d*66tT49MM
 11#(DIFFF%*T"8>--d33  jPS6T6T INNQ   
 #mL9,GMMOO Q Q
d)>)J)J4)P)P &&Q ),-0UU >>sxHH 	9 	9DCCD,XhiiK",q/Cc8,,,,,+'9:: 9  9SX%7%74TYEEEE'++CH555-8L**K)>?? 9(,,SX666-8 *L''))**D1A1H1H1J1J,K,KKKrW   rQ  r   Iterator[AssignmentStmt]c              #     K   |j         D ]$}|j        s|                     |          E d {V  %|j        .|j        j        s$|                     |j                  E d {V  d S d S d S r\   )rD  is_unreachabler\  	else_body)rc   rQ  rD  s      rU   ,_get_assignment_statements_from_if_statementzEPydanticModelTransformer._get_assignment_statements_from_if_statement  s      I 	L 	LD& LEEdKKKKKKKKK>%dn.K%AA$.QQQQQQQQQQQ &%%%rW   blockr   c              #     K   |j         D ]L}t          |t                    r|V  t          |t                    r|                     |          E d {V  Md S r\   )rD  rp   r   r   rk  )rc   rl  rQ  s      rU   r\  z>PydanticModelTransformer._get_assignment_statements_from_block  s}      J 	S 	SD$// S



D&)) SLLTRRRRRRRRR		S 	SrW   r   r   dict[str, PydanticModelClassVar]1PydanticModelField | PydanticModelClassVar | Nonec                    | j         }|j        d         }t          |t                    r$t	          j        |j                  r|j        dk    rdS |j        st          |j        t                    rbt          |j        j
        t                    rCt          |j        j
        j
        t                    r|j        j
        j
        j        t          v rdS |j        |v rdS t          | j        |           dS |j        d         }t          |t                    sdS t	          j        |j                  r|j        dk    rdS |j        j                            |j                  }|dS |j        }t          |t&                    rdS t          |t(                    r| j                            d|           dS t          |t,                    sdS |j        rt1          |j                  S t3          |j                  }t          |t6                    r+|j        j        dk    r| j                            d|           |                     |          }	|                     |          }
|j        r|j        rk|j        rd| j                             |j        d          }|r||_        n9| j                            d	|           tC          tD          j#                  |_        | $                    |          \  }}|r(|j%        s!| j&        j'        rtQ          | j        |           | )                    |          }| *                    ||j        |          }tW          |j        ||	|
|||j,        |j-        ||j        

  
        S )a^  Get pydantic model field from statement.

        Args:
            stmt: The statement.
            model_config: Configuration settings for the model.
            class_vars: ClassVars already known to be defined on the model.

        Returns:
            A pydantic model field if it could find the field in statement. Otherwise, `None`.
        r   r;  NzFType aliases inside BaseModel definitions are not supported at runtimezdataclasses.InitVarz%InitVar is not supported in BaseModelT)is_finalzGNeed type argument for Final[...] with non-literal default in BaseModel)
r   r   r   r   r   r   r   r   r   r   ).r  rE  rp   r    rD   is_valid_field_namer   
new_syntaxrF  r   r3  re   r4  error_untyped_fieldsr  r   r0  r   rq   r"   r(   rH  r*   is_classvarr  r@   r   r9   get_has_default
get_strictrq  is_inferredanalyze_simple_literal_typer7   r<   
from_errorget_alias_infor  r^   r   rJ  is_field_frozen_infer_dataclass_attr_init_typer   r   r   )rc   rQ  r;  r  r   rR  ru   rq   	node_typer   r   r   r   r   r   	init_types                   rU   r]  z=PydanticModelTransformer.collect_field_or_class_var_from_stmt  s    il1o#x(( 	0KCH0U0U 	Y\YaesYsYs4 	4;11	t{18<<	 t{18(CC	 K&-6:MMM
 tx:%%t !D1114l1o#x(( 	4*3844 	N8R8R4hn  **; 4xdO,, 	
 4dI&& 	INNX   4$$$ 	
 4  	3(222 $DI..	i** 	y~/FJ_/_/_INN7  
 **400&&8$2B )77d7SSC :			]   $I$899	#'#6#6t#<#<   	<\%B 	<tGYGw 	<*49d;;;((..	88chMM	!/#;
 
 
 	
rW   ru   r&   r   rP   r   r   r   c                   |j         }|j        r|S t          |j                   }t          |t                    s|S |j                             d          }|r!t          |j        t                    r|j                             d          }|sJ |j         r)t          t          |j         |j         |                    }nt          t          j                  S t          |t                    r8|j        t          t          t          gk    rt!          |j        d         |          S | j                            d|j         j         d|           n)| j                            d|j         j         d|           |S )zvInfer __init__ argument type for an attribute.

        In particular, possibly use the signature of __set__.
        __set__rN   z(Unsupported signature for "__set__" in ""zUnsupported "__set__" in ")r   implicitr@   rp   r9   r   rq   r   get_containing_type_infor6   r7   r<   unannotatedr8   	arg_kindsr   r
   	arg_typesr  rH  r   )	rc   ru   r   r   defaulttsetter
super_infosetter_types	            rU   r}  z8PydanticModelTransformer._infer_dataclass_attr_init_type  sr   
 (< 	NCH%% !X&& 	NI&& 	U&+w// UV<<YGG
!!!!; :"12I&+WXW]_i2j2j"k"kKK"9#8999k<88 g[=RW > >
 3;3H3KQOOOINN#\afk#\#\#\^effff	JAFKJJJGTTTrW   r  list[PydanticModelField]r   r'  c           
        d| j         j        j        v r| j         j        j        d         j        sdS | j        j        }t          |j                  }|j        du}t          |j	        o|j                   }| 
                    |||||||d          }	|r:| j                            t                    j        }
t          |
t                     sJ d|
j        v r|
j        d         j        }t          |t"                    sJ ||j        |j        }t          |t&                    sJ t)          |j                  D ]\  }}|*|                    d          s|                    d          s2| j                            |j        |                   }t3          ||          }|	                    t7          ||dt8                               |                     ||          sPt3          d          }|	                    t7          |t=          t>          j                   dtB                               tE          | j        | j         d|	tG                                 dS )	zAdds a fields-aware `__init__` method to the class.

        The added `__init__` will be annotated with types vs. all `Any` depending on the plugin settings.
        rb   NT)r   r   requires_dynamic_aliasesr   r'  r&  r   ___kwargs)r   return_type)$r  r   r0  plugin_generatedr^   r   r   r   r  rI  get_field_argumentsr  ro   r  rq   rp   r)   r   r   r8   r6  r,  
startswith	anal_typer  r*   appendr   r   should_init_forbid_extrar7   r<   r   r   
add_methodr:   )rc   r  r   r'  r&  r   r   r   r  r   base_settings_nodebase_settings_init_node	func_typearg_idxrS  analyzed_variable_typer   vars                     rU   r!  z(PydanticModelTransformer.add_initializer5  s`    ---din6J:6V6g-F"-FM**+47	#'(B(b6KbGb#c#c ''%%=#'%) ( 	
 	
  	_!%!A!ABW!X!X!]0(;;;;;/555*<*B:*N*S'!"97CCCCC*6;R;W;c 7 <I%i>>>>>-6y7J-K-K _ _)#+x/B/B4/H/H+PXPcPcdgPhPh+$151D1DYEXY`Ea1b1b.#&x1G#H#HHX7MtU\$]$]^^^^,,VV<< 	Uh--CKKgi.@&A&A4SSTTT49di$HJJWWWWWWrW   c           
     8   | j                             t           d| j                             t           d          g          }t          |t	                      g          }t          t          d|          |dt                    }t          j	        | j         j
        j                  5  |                     |dt          |j                  dd||          }ddd           n# 1 swxY w Y   |                     ||          sPt          d          }	|                    t          |	t#          t$          j                  dt(                               |r||gz   n|g|z   }t+          | j         | j        d	|t/          | j        j                  d
           dS )zAdds a fully typed `model_construct` classmethod to the class.

        Similar to the fields-aware __init__ method, but always uses the field names (not aliases),
        and does not treat settings fields as optional.
        z.setz.str_fields_setNTF)r   r   r  r   r'  r&  r  model_construct)r   r  is_classmethod)r  
named_typeBUILTINS_NAMEr?   r:   r   r*   r   r5   r   rY   r   r  r   r   r  r  r7   r<   r   r   r  r  rA   r   )
rc   r  r   r'  r&  set_stroptional_set_strfields_set_argumentr   r  s
             rU   r"  z3PydanticModelTransformer.add_model_construct_methodd  s    )&&-'='='=	@T@TXeUkUkUk@l@l?mnn$gxzz%:;;&s=:J'K'KM]_celmm&ty'8'HII 		 		++!&-00).'+ ,  D		 		 		 		 		 		 		 		 		 		 		 		 		 		 		 ,,VV<< 	Uh--CKKgi.@&A&A4SSTTT/<^t*+++CVBWZ^B^II%din55	
 	
 	
 	
 	
 	
s   */C%%C),C)r	  c                   | j         j        }|D ]C}|j                            |j                  }||j        }t          |t                    r|p|j        |_	        Ot          |t                    r&| j        j        s| j                                         	 t          |          }n# t          $ r t!          |          }Y nw xY wd| d|j         d}	t%          |	| j        | j                    |                    ||d          }||_        ||_	        |j        dz   |j        z   |_        t-          t.          |          |j        |j        <   EdS )zMarks all fields as properties so that attempts to set them trigger mypy errors.

        This is the same approach used by the attrs and dataclasses plugins.
        Nzsym_node.node: r   r   F)r   .)r  r   r0  r   r   rq   rp   r*   r   is_propertyr"   r  final_iterationdeferrP   	TypeErrorreprrd   r   r   re   	_fullnamer&   r   )
rc   r  r   r	  r   r  rc  r  var_strr   s
             rU   r#  z#PydanticModelTransformer.set_frozen  sk   
 y~ 	B 	BEz~~ej11H#mc3'' L&,&?COO_55 Ldi>W LIOO%%%%,"%c(($ , , ,"&s)), SwRR#-RRRF-fdiKKKKll4l>>"( $ 3ch >'6tS'A'A
38$$/	B 	Bs   B**CCFr   r   r<  ModelConfigData | Nonec                
   || j         vrdS |dk    rlt          |t                    r|j        dk    }n;t          |t                    r|j        dk    }n|st          || j        |           dS t          |          S |dk    r4d}t          |t                    r|j
        dk    rd}t          |	          S t          |t                    r |j
        d
v rt          di ||j
        dk    iS t          || j        |           dS )zDetermines the config update due to a single kwarg in the ConfigDict definition.

        Warns if a tracked config attribute is set to a value the plugin doesn't know how to interpret (e.g., an int)
        Nr  forbid)forbid_extrar
  Tbuiltins.NoneF)rI  )builtins.Truebuiltins.Falser  r   )r  rp   r%   r-  r   r   error_invalid_config_valuer  r9  r    re   )rc   r   r   r<  r  rI  s         rU   rA  z*PydanticModelTransformer.get_config_update  s6   
 t11147??#w'' "yH4C,, "x83  	E /tTYDDDt"====$$$"&#x(( ,S\_-L-L&+#"7JKKKKc8$$ 	N9\)\)\"MMdCLO,K%LMMM"4C888trW   c                   | j         }t          |t                    rdS t          |t                    rt          |j        t
                    rx|j        j        t          k    rct          |j	        |j
                  D ]F\  }}||dk    r|j        t          uc S |dk    r#t          |t                    o
|j        dk     c S GdS t          |t                     S )zUReturns a boolean indicating whether the field defined in `stmt` is a required field.FNr  default_factoryr  )rF  rp   r'   r   r3  r#   re   FIELD_FULLNAMErG  r   r,  rd   r   r    rQ  rO  r   r   s       rU   rv  z(PydanticModelTransformer.get_has_default  s     {dH%% 	5dH%% 	*T['*J*J 	t{OcguOuOu
 !DN;; _ _	T<49#4#4=<<<<,,, *3 9 9 ]clo>]^^^^ -5dL1111rW   r   c                P   | j         }t          |t                    rt          |j        t                    ro|j        j        t          k    rZt          |j        |j	                  D ]?\  }}|dk    rt          |t                    r|j        dk    r dS |j        dk    r dS  dS dS )zEReturns a the `strict` value of a field if defined, otherwise `None`.r   r  Tr  FN)rF  rp   r   r3  r#   re   r  rG  r   r,  r    r  s       rU   rw  z#PydanticModelTransformer.get_strict  s     {dH%% 		*T['*J*J 		t{OcguOuOu DN;;  	T8##c8,, %|66#tt)999$uutttrW   tuple[str | None, bool]c                n   | j         }t          |t                    rdS t          |t                    r/t          |j        t
                    r|j        j        t          k    sdS t          |j	                  D ];\  }}|dk    r|j
        |         }t          |t                    r|j        dfc S  dS dS )a  Returns a pair (alias, has_dynamic_alias), extracted from the declaration of the field defined in `stmt`.

        `has_dynamic_alias` is True if and only if an alias is provided, but not as a string literal.
        If `has_dynamic_alias` is True, `alias` will be None.
        )NFr   F)NT)rF  rp   r'   r   r3  r#   re   r  r6  r,  r   r%   r-  rQ  rO  r.  rS  r   s        rU   r{  z'PydanticModelTransformer.get_alias_info  s     {dH%% 	; tX&&	+5dk7+K+K	PTP[PdhvPvPv ;$T^44 	" 	"KAx7"")A,C#w'' "y%''''!zz{rW   c                l   | j         }t          |t                    rdS t          |t                    r/t          |j        t
                    r|j        j        t          k    sdS t          |j	                  D ]:\  }}|dk    r/|j
        |         }t          |t                    o
|j        dk    c S ;dS )al  Returns whether the field is frozen, extracted from the declaration of the field defined in `stmt`.

        Note that this is only whether the field was declared to be frozen in a `<field_name> = Field(frozen=True)`
        sense; this does not determine whether the field is frozen because the entire model is frozen; that is
        handled separately.
        Fr	  r  )rF  rp   r'   r   r3  r#   re   r  r6  r,  r   r    r  s        rU   r|  z(PydanticModelTransformer.is_field_frozen  s     {dH%% 	5 tX&&	+5dk7+K+K	PTP[PdhvPvPv 5$T^44 	U 	UKAx8##il!#x00TS\_5TTTT $ urW   r   r   r   r  r   list[Argument]c	           	     \    
  j         j        

 f	d|D             }	|	S )zHelper function used during the construction of the `__init__` and `model_construct` method signatures.

        Returns a list of mypy Argument instances for use in the generated signatures.
        c                   	 g | ]:}
r|j         |                    	p
j        o
|j        d k              ;S )rY  )r   r   r   r   r   r   r   )r   r   r  r   )rl   r  r   r   r&  r'  r   r  rc   r   r   s     rU   
<listcomp>z@PydanticModelTransformer.get_field_arguments.<locals>.<listcomp>9  s~     
 
 
 
 #("9
)7F;#I)A#0#IUZ65I  	 	
 
 
rW   )r  r   )rc   r  r   r   r   r  r'  r&  r   	argumentsr   s   ` ``````` @rU   r  z,PydanticModelTransformer.get_field_arguments)  sp     y~
 
 
 
 
 
 
 
 
 
 
 
  
 
 
	 rW   c                    |j         s*|                     |t          |j                            rdS |j        rdS | j        j        S )a@  Indicates whether the generated `__init__` should get a `**kwargs` at the end of its signature.

        We disallow arbitrary kwargs if the extra config setting is "forbid", or if the plugin config says to,
        *unless* a required dynamic alias is present (since then we can't determine a valid signature).
        FT)r  is_dynamic_alias_presentr   rI  r  r^   r   )rc   r  r   s      rU   r  z1PydanticModelTransformer.should_init_forbid_extraI  sS     & 	,,VT&:T5U5UVV u 	4!33rW   rI  c                F    | D ]}|j         r dS |r| D ]}|j         dS dS )zReturns whether any fields on the model have a "dynamic alias", i.e., an alias that cannot be
        determined during static analysis.
        TNF)r   r   )r  rI  r  s      rU   r  z1PydanticModelTransformer.is_dynamic_alias_presentV  sZ    
  	 	E& tt 	     ;&44 'urW   N)
r   r   r   r  r   r1   r^   r]   rQ   rZ   )rQ   r   )rQ   rZ   )rQ   r9  )r;  r9  r&  r   rQ   rW  )rQ  r   rQ   rg  )rl  r   rQ   rg  )rQ  r   r;  r9  r  rn  rQ   ro  )ru   r&   r   rP   r   r   rQ   r   )
r  r  r   r9  r'  r   r&  r   rQ   rZ   )r  r  r   r1   r	  r   rQ   rZ   r   )r   rP   r   r   r<  r   rQ   r  )rQ  r   rQ   r   )rQ  r   rQ   r   )rQ  r   rQ   r  )r  r  r   r   r   r   r   r   r  r   r'  r   r&  r   r   r   rQ   r  )r  r  r   r9  rQ   r   )r  r  rI  r   rQ   r   )r   r   r   r   r  r   rb   r   r$  r  r   rk  r\  r]  r}  r!  r"  r#  rA  staticmethodrv  rw  r{  r|  r  r  r  r   rW   rU   r   r     sK         ' ' '    + + + +" " " "H2 2 2 26J J J JXBL BL BL BLHR R R RS S S S
 
 
 
B$ $ $ $L-X -X -X -X^&
 &
 &
 &
PB B B B>! ! ! ! !F 2 2 2 \2*    \    \6    \B */    @4 4 4 4    \  rW   r   c                  @    e Zd ZdZ	 	 	 	 	 	 ddd
ZddZddZddZdS )r9  z(Pydantic mypy plugin model config class.Nr  r   r	  r   r  rI  r   c                Z    || _         || _        || _        || _        || _        || _        d S r\   )r  r	  r   r  rI  r   )rc   r  r	  r   r  rI  r   s          rU   rb   zModelConfigData.__init__h  s6     ). 0#6 rW   rQ   r   c                H    d | j                                         D             S )zReturns a dict of Pydantic model config names to their values.

        It includes the config if config value is not `None`.
        c                    i | ]
\  }}|||S r\   r   )rl   kvs      rU   r   z3ModelConfigData.get_values_dict.<locals>.<dictcomp>}  s    HHHA!-1---rW   )__dict__r@  r   s    rU   r%  zModelConfigData.get_values_dictx  s'    
 IH!4!4!6!6HHHHrW   r   r  rZ   c                    |dS |                                                                 D ]\  }}t          | ||           dS )z$Update Pydantic model config values.N)r%  r@  r   )rc   r   r  r  s       rU   rB  zModelConfigData.update  sV    >F**,,2244 	  	 DAqD!Q	  	 rW   r   rP   r-  r   c                L    t          | |          t          | ||           dS dS )zFSet default value for Pydantic model config if config value is `None`.N)r   r   )rc   r   r-  s      rU   rL  zModelConfigData.setdefault  s2    4%D#u%%%%% &%rW   )NNNNNN)r  r   r	  r   r   r   r  r   rI  r   r   r   r   )r   r  rQ   rZ   )r   rP   r-  r   rQ   rZ   )r   r   r   r   rb   r%  rB  rL  r   rW   rU   r9  r9  e  s        22 %)"'+(,+/"     I I I I       & & & & & &rW   r9  zpydantic-ormzInvalid from_attributes callPydanticzpydantic-configzInvalid config valuezpydantic-aliaszDynamic alias disallowedzpydantic-unexpectedzUnexpected behaviorzpydantic-fieldzUntyped field disallowedzInvalid Field defaultsz!Extra field on RootModel subclass
model_namer   r,   r   r   rZ   c                H    |                     d|  d|t                     dS )zCEmits an error when the model does not have `from_attributes=True`.r  z$" does not have from_attributes=TruecodeN)rH  	ERROR_ORM)r  r   r   s      rU   r   r     s-    HHAAAA7QZH[[[[[rW   r   r1   c                H    |                     d|  d|t                     dS )z0Emits an error when the config value is invalid.zInvalid value for "Config.r  r  N)rH  ERROR_CONFIG)r   r   r   s      rU   r  r    s,    HH1$1117HNNNNNrW   c                @    |                      d|t                     dS )znEmits required dynamic aliases error.

    This will be called when `warn_required_dynamic_aliases=True`.
    z#Required dynamic aliases disallowedr  N)rH  ERROR_ALIASr   r   s     rU   rJ  rJ    s#    
 HH2G+HNNNNNrW   r   8CheckerPluginInterface | SemanticAnalyzerPluginInterfacec                b    d}d|  d}|d| dz  }|                     ||t                     dS )z Emits unexpected behavior error.z6https://github.com/pydantic/pydantic/issues/new/choosez7The pydantic mypy plugin ran into unexpected behavior: 
z&Please consider reporting this bug at z so we can try to fix it!r  N)rH  ERROR_UNEXPECTED)r   r   r   linkfull_messages        rU   r   r     sO    
 DDWVWWWL\T\\\\LHH\7)9H:::::rW   c                @    |                      d|t                     dS )z;Emits an error when there is an untyped field in the model.zUntyped fields disallowedr  N)rH  ERROR_UNTYPEDr  s     rU   rt  rt    s!    HH('HFFFFFrW   c                @    |                      d|t                     dS )z]Emits an error when there is more than just a root field defined for a subclass of RootModel.z2Only `root` is allowed as a field of a `RootModel`r  N)rH  ERROR_EXTRA_FIELD_ROOT_MODELr  s     rU   r^  r^    s"    HHA7QmHnnnnnrW   F8SemanticAnalyzerPluginInterface | CheckerPluginInterfacer   r   r   r  r  r   r   tvar_defTypeVarType | Noner  r   c                ,   |j         }||j        v rR|j        |         }	|	j        r>t          |	j        t
                    r$|j        j                            |	j                   t          | t                    r| 
                    d          }
n|                     dg           }
|rE|pt          t          |                    }t          t          d          |dt           d          g}n6|pt          |          }t          t          d          |dt                     g}||z   }g g g }}}|D ]f}|j        s
J d            |                    |j                   |                    |j        j                   |                    |j                   gt-          |||||
          }|r|g|_        t          ||t1          t3                      g                    }||_         t5          ||          |_        ||_        |j        dz   |z   |_        |j        |_        ||j        v r*tA          ||j                  }|j        |         |j        |<   |rwd|_!        t          ||j                  }||_         |j        |_        d|_"        tG          |tI          d          g|          }|j        |_        tK          tL          |          }	ntK          tL          |          }	d|	_        |	|j        |<   |j'        j        j                            |           dS )	zhVery closely related to `mypy.plugins.common.add_method_to_class`, with a few pydantic-specific changes.zbuiltins.functionr  NT__pydantic_self__z"All arguments must be fully typed.r  r   )(r   r0  r  rp   rq   r   rC  rD  remover1   r  named_generic_typer=   rA   r   r*   r   r   r  r   r   r   r8   	variablesr   r!   r3   r   r8  re   r  r   rB   is_decoratedr  r   r    r&   r   defn)r   r   r   r   r  r   r  r  r   ru   function_typefirstr  r,  r  r   	signaturer7  r_namer  decs                        rU   r  r    s    8D tzj 	+Jsx$A$A 	+HM  ***#677 H':;;../BBGG O>-*=*=!>!>	#f++y$FFG4t!4!4	 #122ItWMMN4<D&("b)yI # #"HH$HHHH,---*+++""""Y	9k=YYI )'j	4uhjj\2233DDI!)T22DI"DM]S(4/DN	DI tz-dDJ??!Z-
6
  
* di  nx667;;9dC((dD))CDJtINt$$$$$rW   r   dict[str, Any] | Nonec                8   |                      d          sdS t          j        dk    rddl}n0	 ddl}n*# t
          $ r ddl}|                    d           Y dS w xY wt          | d          5 }|	                    |          cddd           S # 1 swxY w Y   dS )zReturns a dict of config keys to values.

    It reads configs from toml file and returns `None` if the file is not a toml file.
    z.tomlN)      r   zJNo TOML parser installed, cannot read configuration from `pyproject.toml`.rb)
r~   sysversion_infotomllibtomliImportErrorwarningswarnopenload)r   toml_r  rfs       rU   r   r     s   
 (( t
7""	!!!!! 	 	 	OOOMMfggg44		 
k4	 	  Bzz"~~                 s!   3 #AA-BBB)rO   rP   rQ   rR   )r   r.   rQ   r;   )r  rP   r   r,   r   r   rQ   rZ   )r   rP   r   r1   r   r   rQ   rZ   )r   r1   r   r   rQ   rZ   )r   rP   r   r  r   r   rQ   rZ   )r   r,   r   r   rQ   rZ   )NNF)r   r  r   r   r   rP   r   r  r  r;   r   r   r  r  r  r   rQ   rZ   )r   rP   rQ   r  )|r   
__future__r   r  configparserr   typingr   r   r   mypy.errorcodesr   mypy.expandtyper	   r
   
mypy.nodesr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   mypy.optionsr+   mypy.pluginr,   r-   r.   r/   r0   r1   mypy.plugins.commonr2   mypy.semanalr3   mypy.server.triggerr4   
mypy.stater5   mypy.typeopsr6   
mypy.typesr7   r8   r9   r:   r;   r<   r=   r>   r?   r@   mypy.typevarsrA   	mypy.utilrB   mypy.versionrC   mypy_versionpydantic._internalrD   pydantic.versionrE   r   r   rj   r  r  rx   r  DATACLASS_FULLNAMEr5  r4  MYPY_VERSION_TUPLEr  rV   rT   r]   r   r   r  r   r9  r  r  r  r  r  ERROR_FIELD_DEFAULTSr  r   r  rJ  r   rt  r^  r  r   r   rW   rU   <module>r!     s   d d " " " " " " 



 % % % % % % * * * * * * * * * * % % % % % % @ @ @ @ @ @ @ @! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !D !                               + * * * * * 5 5 5 5 5 5       0 0 0 0 0 0                        ( ' ' ' ' ' 2 2 2 2 2 2 4 4 4 4 4 4 & & & & & & / / / / / / '. = 5 R (5 K     ('55     3@ 3@ 3@ 3@ 3@V 3@ 3@ 3@l+C +C +C +C +C +C +C +C\# # # #4AT AT AT AT AT AT AT ATH
 
 
 
 
 
 
 
2N N N N N N N Nb$& $& $& $& $& $& $& $&N In&DjQQ	y*,BJOOi(*DjQQ924I:VV 	*,F
SS y!13KZXX (y)9;^`jkk \ \ \ \
O O O O
O O O O; ; ; ;G G G G
o o o o "#' U% U% U% U% U%p     rW   