+
    ij                       R t ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIH	t	H
t
 ^ RIHt ^ RIHtHt ^ RIHtHtHtHtHtHtHtHtHtHtHtHtHtHtHtH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/H0t0 ^ R	I1H2t2 ^ R
I3H4t4H5t5H6t6H7t7H8t8H9t9 ^ RI:H;t; ^ RI<H=t= ^ RI>H?t? ^ RI@HAtA ^ RIBHCtC ^ RIDHEtE ^ RIFHGtGHHtHHItIHJtJHKtKHLtLHMtMHNtNHOtOHPtP ^ RIQHRtR ^ RISHTtT ^ RIUHVtW ^ RIXHYtY ^ RIZH[t[ Rt\Rt]Rt^Rt_Rt`RtaRtbRtcRtd0 RSmte]eR 0,
          tf][! ]W4      tgR!th^tVR" R# lti ! R$ R%]74      tj ! R& R'4      tkR( R) ltl ! R* R+4      tm ! R, R-4      tn ! R. R/4      to ! R0 R1]C4      tp ! R2 R34      tqR4 R5 ltr]! R6R7R84      ts]! R9R:R84      tt]! R;R<R84      tu]! R=R>R84      tv]! R?R@R84      tw]! R?RAR84      tx]! R?RBR84      tyRC RD ltzRE RF lt{RG RH lt|RI RJ lt}RK RL lt~RM RN ltRTRO RP lltRQ RR ltR# )Uz^This module includes classes and functions designed specifically for use with the mypy plugin.)annotationsN)Iterator)ConfigParser)AnyCallable)	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)TypeTranslator)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_validator0pydantic.functional_serializers.model_serializerbuiltinsc                    V ^8  d   QhRRRR/# )   versionstrreturnztype[Plugin] )formats   "T/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pydantic/mypy.py__annotate__rR   m   s      C L     c                    \         # )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)rL   s   &rQ   pluginrV   m   s
     rS   c                  z   a  ] tR t^|tRtR V 3R lltR R ltR R ltR R	 ltR
 R lt	R R lt
R R ltRtV ;t# )rU   zThe Pydantic mypy plugin.c                    V ^8  d   QhRRRR/# rK   optionsr*   rN   NonerO   )rP   s   "rQ   rR   PydanticPlugin.__annotate__   s     " " "D "rS   c                	   < \        V4      V n        V P                  P                  4       V n        \        SV `  V4       R # N)PydanticPluginConfigplugin_configto_data_plugin_datasuper__init__)selfrZ   	__class__s   &&rQ   rd   PydanticPlugin.__init__   s4    1': ..668!rS   c                    V ^8  d   QhRRRR/# rK   fullnamerM   rN   z(Callable[[ClassDefContext], None] | NonerO   )rP   s   "rQ   rR   r\      s      C 4\ rS   c                    V P                  V4      pV'       dR   \        VP                  \        4      '       d2   VP                  P	                  \
        4      '       d   V P                  # R# )zUpdate Pydantic model class.N)lookup_fully_qualified
isinstancenoder(   has_baseBASEMODEL_FULLNAME$_pydantic_model_class_maker_callback)re   rj   syms   && rQ   get_base_class_hook"PydanticPlugin.get_base_class_hook   sJ    ))(3:chh11xx  !344@@@rS   c                    V ^8  d   QhRRRR/# ri   rO   )rP   s   "rQ   rR   r\      s      3 3[ rS   c                4    V\         8X  d   V P                  # R# )z,Update Pydantic `ModelMetaclass` definition.N)MODEL_METACLASS_FULLNAME)_pydantic_model_metaclass_marker_callbackre   rj   s   &&rQ   get_metaclass_hook!PydanticPlugin.get_metaclass_hook   s    //AAArS   c                    V ^8  d   QhRRRR/# )rK   rj   rM   rN   z&Callable[[MethodContext], Type] | NonerO   )rP   s   "rQ   rR   r\      s       0V rS   c                @    VP                  R4      '       d   \        # R# )z-Adjust return type of `from_orm` method call.z	.from_ormN)endswithfrom_attributes_callbackry   s   &&rQ   get_method_hookPydanticPlugin.get_method_hook   s    [))++rS   c                    V ^8  d   QhRRRR/# )rK   ctxr/   rN   dict[str, Any]rO   )rP   s   "rQ   rR   r\      s     ! !&9 !n !rS   c                    V P                   # )zZReturn all plugin config data.

Used by mypy to determine if cache needs to be discarded.
)rb   )re   r   s   &&rQ   report_config_data!PydanticPlugin.report_config_data   s    
    rS   c                    V ^8  d   QhRRRR/# rK   r   r,   rN   r[   rO   )rP   s   "rQ   rR   r\      s          D  rS   c                	    \        VP                  VP                  VP                  V P                  4      pVP                  4        R # r^   )PydanticModelTransformerclsreasonapir`   	transform)re   r   transformers   && rQ   rq   3PydanticPlugin._pydantic_model_class_maker_callback   s0    .sww

CGGTM_M_`rS   c                    V ^8  d   QhRRRR/# r   rO   )rP   s   "rQ   rR   r\      s     @ @_ @QU @rS   c                    V P                   P                  '       d   R# VP                  P                  P                  pV'       g   Q R4       h\        VP                  RR4      '       d   RVP                  n        R# R# )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   )re   r   info_metaclasss   && rQ   rx   8PydanticPlugin._pydantic_model_metaclass_marker_callback   sd     77788NNN~>&&(BDII;?N8 JrS   )rb   r`   )__name__
__module____qualname____firstlineno____doc__rd   rs   rz   r   r   rq   rx   __static_attributes____classcell__rf   s   @rQ   rU   rU   |   s5    #" "
! @ @rS   rU   c                  `    ] tR t^t$ RtRtR]R&   R]R&   R]R&   R]R&   R R ltR	 R
 ltRt	R# )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   boolc                    V ^8  d   QhRRRR/# rY   rO   )rP   s   "rQ   rR   !PydanticPluginConfig.__annotate__   s     , , ,D ,rS   c                	   VP                   f   R # \        VP                   4      pVez   VP                  R/ 4      P                  R/ 4      pV P                   FE  pVP                  VR4      p\	        V\
        4      '       g   \        RV 24      h\        WV4       KG  	  R # \        4       pVP                  VP                   4       V P                   F'  pVP                  \        VRR7      p\        WV4       K)  	  R # )NtoolrF   Fz/Configuration value must be a boolean for key: )fallback)config_file
parse_tomlget	__slots__rm   r   
ValueErrorsetattrr   read
getbooleanCONFIGFILE_KEY)re   rZ   toml_configconfigkeysettingr`   s   &&     rQ   rd   PydanticPluginConfig.__init__   s    & !4!45" __VR044_bIF~~ **S%0!'400$'VWZV[%\]]7+	 & )NMw223~~'22>3QV2W7+ &rS   c                   V ^8  d   QhRR/# rK   rN   r   rO   )rP   s   "rQ   rR   r      s     C C CrS   c                V    V P                    Uu/ uF  q\        W4      bK  	  up# u upi )z/Returns a dict of config names to their values.)r   r   )re   r   s   & rQ   ra   PydanticPluginConfig.to_data   s&    37>>B>CWT''>BBBs   &rO   N)r   r   r   r   )
r   r   r   r   r   r   __annotations__rd   ra   r   rO   rS   rQ   r_   r_      s9    I #''##,&C CrS   r_   c                    V ^8  d   QhRRRR/# )rK   r   r-   rN   r;   rO   )rP   s   "rQ   rR   rR      s     # #- #D #rS   c                L   V P                   p\        V\        4      '       d   VP                  p\        V\        4      '       d.   \        VP
                  \        4      '       d   VP
                  pMb\        V\        4      '       d   TpMIRV RVP                  P                   R2p\        W0P                  V P                  4       V P                  # VP                   P                  P                  \        4      pVf   V P                  # VP                   P!                  \"        4      '       g   V P                  # VP                  R/ 4      P                  R4      pVRJd6   \%        VP                   P&                  V P                  V P                  4       V P                  # )z1Raise an error if from_attributes is not enabled.z
ctx.type: z
 (of type )r   from_attributesT)r   rm   r=   itemr8   ret_typer9   rf   r   error_unexpected_behaviorr   contextdefault_return_typemetadatar   METADATA_KEYro   rp   error_from_attributesname)r   ctx_type
model_typedetailpydantic_metadatar   s   &     rQ   r   r      s=    xxH(H%%==(L))j9J9JH.U.U&&
	Hh	'	'
hZz(2D2D2M2M1NaP!&''3;;?&&&"0044\B &&&??##$677&&&'++Hb9==>OPOd"joo22CGGS[[I"""rS   c                      ] tR t^tRtR R ltR R ltRR R lltRR R	 lltR
 R lt	]
R R l4       tR R ltRtR# )PydanticModelFieldz5Based on mypy.plugins.dataclasses.DataclassAttribute.c               @    V ^8  d   QhRRRRRRRRRRR	R
RRRRRRRR/
# )rK   r   rM   aliasz
str | None	is_frozenr   has_dynamic_aliashas_defaultstrictbool | Nonelineintcolumnr   Type | Noner   r(   rO   )rP   s   "rQ   rR   PydanticModelField.__annotate__   sn        	
        rS   c                	~    Wn         W n        W0n        W@n        WPn        W`n        Wpn        Wn        Wn        Wn	        R # r^   )
r   r   r   r   r   r   r   r   r   r   )re   r   r   r   r   r   r   r   r   r   r   s   &&&&&&&&&&&rQ   rd   PydanticModelField.__init__   s8     	
"!2&			rS   c               <    V ^8  d   QhRRRRRRRRRRRR	R
RRRRR/	# )rK   current_infor(   typedr   model_strictforce_optional	use_aliasr   r0   force_typevars_invariantis_root_model_rootrN   r   rO   )rP   s   "rQ   rR   r     sd     
 

 
 	

 
 
 -
 #'
 !
 

rS   c	                n   V P                  WWW4      p	V P                  f   TMV P                  p
V'       g	   V
'       d   V P                  WRR7      pM\        \        P
                  4      p\        T	TRV'       d   \        R7      # V'       g   V P                  '       d   \        R7      # \        R7      # )zABased on mypy.plugins.dataclasses.DataclassAttribute.to_argument.NT)include_root_type)variabletype_annotationinitializerkind)to_varr   r   r7   r<   explicitr   r   r   r   r
   )re   r   r   r   r   r   r   r   r   r   r   r   s   &&&&&&&&&   rQ   to_argumentPydanticModelField.to_argument  s     ;;|)V!%!4$++F"..|TX.YO%i&8&89O+! 	
 	
 $2T5E5E5E-
 	
 LU
 	
rS   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
rK   r   r(   r   r0   r   r   r   rN   r   rO   )rP   s   "rQ   rR   r   2  s<     + ++ -+ #'	+
  + 
+rS   c                   V'       dL   \        V P                  \        4      '       d,   V P                  P                  4       p\        Vn        WPn        V P                  Eem   V P                  P                  EeT   \        P                  ! VP                  P                  4      ;_uu_ 4        \        V4      p\        V\        4      '       g   Q hV'       d7   VP                   F&  p\        V\        4      '       g   K  \        Vn        K(  	  \        V P                  V P                  P                  P                   V/4      pV'       dv   \        V\        4      '       d`   \#        VP                  4      '       dE   VP                  R,          P                  p	V	f   VuuRRR4       # \%        W4      p
\'        W.4      pVuuRRR4       # V P                  #   + '       g   i     T P                  # ; i)zABased on mypy.plugins.dataclasses.DataclassAttribute.expand_type.Nroot)rm   r   r>   copy_modifiedr   variancer   	self_typer4   strict_optional_setrZ   strict_optionalrA   r9   argsr   idis_root_modelr	   r?   )re   r   r   r   r   modified_typefilled_with_typevarsargexpanded_type	root_typeexpanded_root_types   &&&&&      rQ   r   PydanticModelField.expand_type2  sq    $
 $))[11 $		 7 7 9)2&)	99 TYY%8%8%D
 **3;;+F+FGG'4\'B$!"6AAAA+388%c;77+4CL  9 !,DII		8K8K8N8NPd7e f$M8)L)LQ^_l_q_qQrQr !. 2 26 : ? ?I (,! HG" *A)Z&$-}.Q$RM$' HG( yy) HG( yys   .+G"GB G,GG6	c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
rK   r   r(   r   r0   r   r   r   rN   r)   rO   )rP   s   "rQ   rR   r   _  sC     X XX -X 	X
 #'X 
XrS   c                    V'       d   V P                   e   V P                   pMV P                  p\        WPP                  WV4      4      # )z<Based on mypy.plugins.dataclasses.DataclassAttribute.to_var.)r   r   r)   r   )re   r   r   r   r   r   s   &&&&& rQ   r   PydanticModelField.to_var_  s;     /::D99D4)),=UVWWrS   c                   V ^8  d   QhRR/# rK   rN   r   rO   )rP   s   "rQ   rR   r   n  s     
 
8 
rS   c                "   V P                   '       g   Q hRV P                  RV P                  RV P                  RV P                  RV P
                  RV P                  RV P                  RV P                  R	V P                   P                  4       /	# )
?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   	serializere   s   &rQ   r  PydanticModelField.serializen  sx    yyyyDIITZZ!7!74++dkkDIIdkkDII'')

 
	
rS   c               (    V ^8  d   QhRRRRRRRR/# )	rK   r   r(   datar   r   r0   rN   r   rO   )rP   s   "rQ   rR   r   ~  s*     0 0x 0x 0>] 0bt 0rS   c                p    VP                  4       p\        VP                  R4      V4      pV ! RRVRV/VB # )ABased on mypy.plugins.dataclasses.DataclassAttribute.deserialize.r   r   rO   )copyr1   pop)r   r   r  r   typs   &&&& rQ   deserializePydanticModelField.deserialize}  s<     yy{(&)93?//$/$//rS   c               $    V ^8  d   QhRRRRRR/# )rK   sub_typer(   r   r0   rN   r[   rO   )rP   s   "rQ   rR   r     s(     T TH TCb Tgk TrS   c                   V P                   ec   \        P                  ! VP                  P                  4      ;_uu_ 4        \        V P                   WP                  4      V n         RRR4       R# R#   + '       g   i     R# ; i)zhExpands type vars in the context of a subtype when an attribute is inherited
from a generic super type.
N)r   r4   r   rZ   r   r6   r   )re   r  r   s   &&&rQ   expand_typevar_from_subtype.PydanticModelField.expand_typevar_from_subtype  sW     99 **3;;+F+FGG3DIIxS	 HG !GGGs   &A33B	)
r   r   r   r   r   r   r   r   r   r   N)FFF)r   r   r   r   r   rd   r   r   r   r  classmethodr  r  r   rO   rS   rQ   r   r      s@    ?0
:+ZX
 0 0T TrS   r   c                  B    ] tR tRtRtR t]R R l4       tR R ltRt	R	# )
PydanticModelClassVari  zBased on mypy.plugins.dataclasses.DataclassAttribute.

ClassVars are ignored by subclasses.

Attributes:
    name: the ClassVar name
c                	    Wn         R # r^   r   )re   r   s   &&rQ   rd   PydanticModelClassVar.__init__  s    	rS   c                    V ^8  d   QhRRRR/# )rK   r  r   rN   r!  rO   )rP   s   "rQ   rR   "PydanticModelClassVar.__annotate__  s      x ,A rS   c                2    VP                  4       pV ! R/ VB # )r  rO   )r  )r   r  s   &&rQ   r  !PydanticModelClassVar.deserialize  s     yy{{T{rS   c                   V ^8  d   QhRR/# r
  rO   )rP   s   "rQ   rR   r&    s     
 
8 
rS   c                    RV P                   /# )r  r   r#  r  s   &rQ   r  PydanticModelClassVar.serialize  s     DII
 	
rS   r#  N)
r   r   r   r   r   rd   r  r  r  r   rO   rS   rQ   r!  r!    s*      

 
rS   r!  c                  X   ] tR tRt$ Rt0 R/mtR]R&   R R ltR R ltR	 R
 lt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR0R R llt]R R  l4       t]R! R" l4       t]R# R$ l4       t]R% R& l4       tR0R' R( lltR) R* lt]R+ R, l4       tR-tR.# )1r   i  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.
zset[str]tracked_config_fieldsc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )rK   r   r   r   zExpression | Statementr   r0   r`   r_   rN   r[   rO   )rP   s   "rQ   rR   %PydanticModelTransformer.__annotate__  s<     + ++ '+ -	+
 ,+ 
+rS   c                	6    Wn         W n        W0n        W@n        R # r^   )_cls_reason_apir`   )re   r   r   r   r`   s   &&&&&rQ   rd   !PydanticModelTransformer.__init__  s     		*rS   c                   V ^8  d   QhRR/# )rK   rN   r   rO   )rP   s   "rQ   rR   r/    s     " "4 "rS   c           	        V P                   P                  p\        V4      pV P                  4       pV P	                  W24      w  rEVe   Vf   R# V F  pVP
                  e   K   R# 	  VP                  \        4      pV P                  WCWr4       V P                  WCWr4       V P                  W@P                  VP                  RJ R7       V P                  4        RV Uu/ uF  qfP                  VP                  4       bK  	  upRV Uu/ uF  qP                  VP                  4       bK  	  upRVP!                  4       /VP"                  \$        &   R# u upi u upi )aV  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
FT)frozenfields
class_varsr   )r1  r   r   collect_configcollect_fields_and_class_varsr   ro   BASESETTINGS_FULLNAMEadd_initializeradd_model_construct_method
set_frozenr3  r7  adjust_decorator_signaturesr   r  get_values_dictr   r   )	re   r   is_a_root_modelr   r8  r9  fieldis_settings	class_vars	   &        rQ   r   "PydanticModelTransformer.transform  s1    yy~~'-$$&!??X>Z/Ezz!  mm$9:V[J''U		&--42GH((* &I&zz5??#44&IR\]R\Y>>9+>+>+@@R\]f,,.'
l#  J]s    #E
#E
c                   V ^8  d   QhRR/# )rK   rN   r[   rO   )rP   s   "rQ   rR   r/    s     2 2T 2rS   c                  a V P                   P                  P                  P                  4        EFA  p\	        VP
                  \        4      '       g   K&  VP
                  P                  ^ ,          o\	        S\        4      '       g   K[  \	        SP                  \        4      '       g   K}  SP                  P                  \        9   g   K  SP                  P                  \        8X  dj   \        ;QJ d2    V3R l\        SP                   4       4       F  '       g   K   RM'	  RM#! V3R l\        SP                   4       4       4      '       d   EK&  RVP
                  P"                  n        EKD  	  R# )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`.
c              3     <"   T FL  w  rSP                   V,          R 8H  ;'       d(    \        V\        4      ;'       d    VP                  R8H  x  KN  	  R# 5i)modeafterN)	arg_namesrm   r$   value).0ir  	first_decs   &  rQ   	<genexpr>GPydanticModelTransformer.adjust_decorator_signatures.<locals>.<genexpr>  sR       *C &//2f<rrCQXAYrr^a^g^gkr^rr*Cs   #AAATFN)r1  r   namesvaluesrm   rn   r   original_decoratorsr   calleer   rj   (IMPLICIT_CLASSMETHOD_DECORATOR_FULLNAMESMODEL_VALIDATOR_FULLNAMEany	enumerater   funcis_class)re   rr   rP  s   & @rQ   r@  4PydanticModelTransformer.adjust_decorator_signatures  s     99>>''..0C#((I..HH88;	y(33"9#3#3X>>!((115]] "((115MMC  *3INN*C CCC  *3INN*C    .2CHHMM*# 1rS   c                   V ^8  d   QhRR/# )rK   rN   ModelConfigDatarO   )rP   s   "rQ   rR   r/    s     J J JrS   c           
     D   V P                   p\        4       pRpRpVP                  P                  4        F3  w  rVV P	                  WV4      pV'       g   K   RpVP                  V4       K5  	  RpVP                  P                   EFf  p\        V\        \        34      '       g   K"  \        V\        4      '       EdG   VP                  ^ ,          p	\        V	\        4      '       d   V	P                  R8w  d   Ku  \        VP                  \        4      '       dh   \!        VP                  P"                  VP                  P$                  4       F-  w  rV
f   K  VP                  V P	                  WRR7      4       K/  	  EMB\        VP                  \&        4      '       dc   VP                  P                   FH  w  r\        V\(        4      '       g   K  VP                  V P	                  VP*                  V4      4       KJ  	  M\        V\        4      '       d   VP                  R8w  d   EK  VP                  P                   F{  p\        V\        4      '       g   K  VP                  ^ ,          p	\        V	\        4      '       g   KF  VP                  V P	                  V	P                  VP                  4      4       K}  	  V'       d   V P,                  P/                  RV4        MRpEKi  	  V'       g	   V'       dq   V'       di   VP0                  '       dW   VP2                  '       gE   VP4                  '       g3   V P6                  P8                  '       d   \;        V P,                  V4       VP<                  P>                  R,           F  p\@        VPB                  9  d   K  V P,                  PE                  \G        VPH                  4      4       VPB                  \@        ,          R	,          P                  4        F  w  ppVPK                  VV4       K  	  K  	  V# )
zhCollects the values of the config attributes that are used by the plugin, accounting for parent classes.FTNmodel_config)	lax_extraConfigzYSpecifying config in two places is ambiguous, use either Config attribute or class kwargs:   NNr   )&r1  r_  keywordsitemsget_config_updateupdatedefsbodyrm   r   r   lvaluesr   r   rvaluer   ziprL  r   r   r$   rM  r3  failhas_alias_generatorvalidate_by_namepopulate_by_namer`   r   error_required_dynamic_aliasesr   mror   r   add_plugin_dependencyr3   rj   
setdefault)re   r   r   has_config_kwargshas_config_from_namespacer   exprconfig_datastmtlhsarg_namer  key_expr
value_exprsubstmtr   rM  s   &                rQ   r:  'PydanticModelTransformer.collect_config  s   ii "!$)! ,,,,.JD00<K{$(!k*	 / "&HHMMDd^X$>??$//ll1o!#x00CHH4Ndkk844),T[[-B-BDKKDTDT)U#+$d&<&<XVZ&<&[\ *V  X66040A0A,)(G<<$d&<&<X^^Z&XY 1B
 D(++99(#yy~~G%g~>> !//!,C%c844 MM$"8"87>>"RS  . !		o (,%M "P  9...000F4K4K4K&&DDD.tyy$?HHLL$$D4==0 II++,A$--,PQ#}}\:8DJJLe!!$.  M % rS   c               $    V ^8  d   QhRRRRRR/# )rK   ra  r_  r   r   rN   zJtuple[list[PydanticModelField] | None, list[PydanticModelClassVar] | None]rO   )rP   s   "rQ   rR   r/  P  s.     BL BL+BL<@BL	SBLrS   c                j   V P                   p/ p/ p\        VP                  P                  ^R 4       EF  p\        VP
                  9  d   K  V P                  P                  \        VP                  4      4       VP
                  \        ,          R,          P                  4        F  w  rx\        P                  WhV P                  4      p	V	P                  VP                  V P                  4       WV&   VP                  P                  P                  V4      p
V
'       g   K~  V
P                   '       g   K  \#        V
P                   \$        4      '       d   K  V P                  P'                  RV
P                   4       K  	  VP
                  \        ,          R,          P                  4        F  w  rx\(        P                  V4      WW&   K  	  EK  	  \+        4       p\+        4       pV P-                  VP.                  4       F  pV P1                  WV4      pVf   K  VP2                  ^ ,          p\#        V\4        4      '       g   Q h\#        V\        4      '       d]   V'       d*   VP6                  R8w  d   \9        V P                  V4       K  VP;                  VP6                  4       WVP6                  &   K  \#        V\(        4      '       g   K  VP;                  VP6                  4       WVP6                  &   K  	  \=        VP?                  4       4      \=        VP?                  4       4      3# )zACollects the fields for the model, accounting for parent classes.r8  z7BaseModel field may only be overridden by another fieldr9  r   ) r1  reversedr   rs  r   r   r3  rt  r3   rj   rf  r   r  r  rS  r   rn   rm   r)   rn  r!  set%_get_assignment_statements_from_blockri  $collect_field_or_class_var_from_stmtrk  r   r    error_extra_fields_on_root_modeladdlistrT  )re   ra  r   r   found_fieldsfound_class_varsr   r   r  rC  sym_nodecurrent_field_namescurrent_class_vars_namesrz  maybe_fieldr{  s   &&&             rQ   r;  6PydanticModelTransformer.collect_fields_and_class_varsP  sS    ii 79=?SXX\\!B/0D 4==0 II++,A$--,PQ"mmL9(CIIK
*66t499M
 11#((DIIF%*T"88>>--d38jPS6T6TIINNQ  L  #mmL9,GMMO
)>)J)J4)P & P5 1< ),-0U >>sxxHDCCDXhiK",,q/Cc8,,,,+'9:: SXX%74TYYE'++CHH5-8*K)>??(,,SXX6-8* I" L'')*D1A1H1H1J,KKKrS   c                    V ^8  d   QhRRRR/# )rK   rz  r   rN   Iterator[AssignmentStmt]rO   )rP   s   "rQ   rR   r/    s     R R RLd RrS   c              #  	8  "   VP                    F0  pVP                  '       d   K  V P                  V4       R j  xL
  K2  	  VP                  eD   VP                  P                  '       g&   V P                  VP                  4       R j  xL
  R # R # R #  L[ L5ir^   )rj  is_unreachabler  	else_body)re   rz  rj  s   && rQ   ,_get_assignment_statements_from_if_statementEPydanticModelTransformer._get_assignment_statements_from_if_statement  sx     IID&&&EEdKKK  >>%dnn.K.K.KAA$..QQQ /L% LQs,   BBB1B-BBBBc                    V ^8  d   QhRRRR/# )rK   blockr   rN   r  rO   )rP   s   "rQ   rR   r/    s     S S5 SE] SrS   c              #  	   "   VP                    FP  p\        V\        4      '       d   Vx  K  \        V\        4      '       g   K7  V P	                  V4       R j  xL
  KR  	  R #  L
5ir^   )rj  rm   r   r   r  )re   r  rz  s   && rQ   r  >PydanticModelTransformer._get_assignment_statements_from_block  sL     JJD$//
D&))LLTRRR	  Ss   ?A'A'A%A'c               (    V ^8  d   QhRRRRRRRR/# )	rK   rz  r   ra  r_  r9  z dict[str, PydanticModelClassVar]rN   z1PydanticModelField | PydanticModelClassVar | NonerO   )rP   s   "rQ   rR   r/    s2     G
 G
"G
2AG
OoG
	:G
rS   c                ~	   V P                   pVP                  ^ ,          p\        V\        4      '       d8   \        P
                  ! VP                  4      '       d   VP                  R8X  d   R# VP                  '       g   \        VP                  \        4      '       d   \        VP                  P                  \        4      '       dj   \        VP                  P                  P                  \        4      '       d6   VP                  P                  P                  P                  \        9   d   R# VP                  V9   d   R# \        V P                  V4       R# VP                  ^ ,          p\        V\        4      '       g   R# \        P
                  ! VP                  4      '       d   VP                  R8X  d   R# VP                  P                   P#                  VP                  4      pVf   R# VP$                  p\        V\&        4      '       d   R# \        V\(        4      '       d   V P                  P+                  RV4       R# \        V\,        4      '       g   R# VP.                  '       d   \1        VP                  4      # \3        VP4                  4      p\        V\6        4      '       d8   VP4                  P                  R8X  d   V P                  P+                  RV4       V P9                  V4      p	V P;                  V4      p
VP4                  f   VP<                  '       d   VP>                  '       dq   V P                  PA                  VP                  RR7      pV'       d   Wn        M:V P                  P+                  RV4       \C        \D        PF                  4      Vn        VP<                  '       d   V	'       d   \1        VP                  4      # V PI                  V4      w  rV'       dW   VPJ                  '       gE   VPL                  '       g3   V PN                  PP                  '       d   \S        V P                  V4       V PU                  V4      pV PW                  WeP                  V4      p\Y        VP                  VV	V
VVVPZ                  VP\                  VVP                  R	7
      # )
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`.
ra  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   )/r1  rk  rm   r   rD   is_valid_field_namer   
new_syntaxrl  r   rV  rj   DECORATOR_FULLNAMESerror_untyped_fieldsr3  r   rS  r   rn   r!   r'   rn  r)   is_classvarr!  r@   r   r9   get_has_default
get_strictr  is_inferredanalyze_simple_literal_typer7   r<   
from_errorget_alias_inforp  rq  r`   r   rr  is_field_frozen_infer_dataclass_attr_init_typer   r   r   )re   rz  ra  r9  r   r{  rr   rn   	node_typer   r   r  r   r   r   	init_types   &&&&            rQ   r  =PydanticModelTransformer.collect_field_or_class_var_from_stmt  sT    iill1o#x((0K0KCHH0U0UY\YaYaesYs4;;11t{{118<<t{{1188(CCKK&&--66:MM
 xx:% !D1ll1o#x((**38844N8Rhhnn  *; xxdO,,
 dI&&IINNX $$$
  (22 $DII.	i**y~~/F/FJ_/_IINN7
 **40&88$2B2B2B ))77d7SC			] $I$8$89	===[(22#'#6#6t#< !222l6S6S6S""@@@*499d;((.	88hhM	!/#;;
 	
rS   c               (    V ^8  d   QhRRRRRRRR/# )	rK   rr   r%   r   rM   r   r   rN   r   rO   )rP   s   "rQ   rR   r/  +  s*     $ $? $# $X_ $do $rS   c                   VP                   pVP                  '       d   V# \        VP                   4      p\        V\        4      '       g   V# VP                   P                  R4      pV'       Ed[   \        VP                  \        4      '       Ed   VP                   P                  R4      pV'       g   Q hVP                   '       d,   \        \        VP                   VP                   V4      4      pM\        \        P                  4      # \        V\        4      '       d>   VP                  \        \        \        .8X  d   \!        VP"                  ^,          V4      # V P$                  P'                  RVP                   P(                   R2V4        V# V P$                  P'                  RVP                   P(                   R2V4       V# )zfInfer __init__ argument type for an attribute.

In particular, possibly use the signature of __set__.
__set__z(Unsupported signature for "__set__" in ""zUnsupported "__set__" in ")r   implicitr@   rm   r9   r   rn   r   get_containing_type_infor6   r7   r<   unannotatedr8   	arg_kindsr   r	   	arg_typesr3  rn  r   )	re   rr   r   r   defaulttsetter
super_infosetter_types	   &&&&     rQ   r  8PydanticModelTransformer._infer_dataclass_attr_init_type+  sV   
 ((<<<NCHH% !X&&NI&6&++w//VV<<YG
!!z;;;"12I&++WXW]W]_i2j"kK"9#8#899k<88[=R=RW >
 3;3H3H3KQOOIINN%Maffkk]Z[#\^ef  		!;AFFKK=JGTrS   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# 
rK   r8  list[PydanticModelField]r   r_  rD  r   r   rN   r[   rO   )rP   s   "rQ   rR   r/  Q  s;     4X 4X.4X8G4XVZ4Xko4X	4XrS   c                t   RV P                   P                  P                  9   d:   V P                   P                  P                  R,          P                  '       g   R# V P                  P
                  p\        VP                  4      pVP                  ;'       g    VP                  '       * ;'       d    VP                  RJp\        VP                  ;'       d    VP                  '       * 4      pV P                  VVVVVVVRR7      p	V'       Ed   V P                  P                  \        4      P                   p
\#        V
\$        4      '       g   Q hRV
P                  9   EdK   V
P                  R,          P                   p\#        V\&        4      '       g   Q hVEe   VP(                  Ee   VP(                  p\#        V\*        4      '       g   Q h\-        VP.                  4       F  w  rVe/   VP1                  R4      '       g   VP1                  R4      '       g   K9  V P                  P3                  VP4                  V,          4      pVe0   VR8X  d)   VP7                  \9        \:        P<                  4      4      p\?        W4      pV	PA                  \C        VVR\D        4      4       K  	  V PG                  W4      '       gD   \?        R	4      pV	PA                  \C        V\I        \:        PJ                  4      R\L        4      4       \O        V P                  V P                   RV	\Q        4       R
7       R# )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.
rd   NFT)r   r   requires_dynamic_aliasesr   rD  r   r   ____cli_settings_sourcekwargs)r   return_type))r1  r   rS  plugin_generatedr`   r   r   r   rp  rq  validate_by_aliasro  get_field_argumentsr3  rl   r<  rn   rm   r(   r   r   r8   rZ  rL  
startswith	anal_typer  acceptChangeExplicitTypeOfAnyr<   from_omitted_genericsr)   appendr   r   should_init_forbid_extrar7   r   r   
add_methodr:   )re   r8  r   rD  r   r   r   r   r  r   base_settings_nodebase_settings_init_node	func_typearg_idxr|  analyzed_variable_typer   vars   &&&&&             rQ   r=  (PydanticModelTransformer.add_initializerQ  s    ---diinn6J6J:6V6g6g6g""--FMM*00KKF4K4KLvvQWQiQiqvQv	#'(B(B(b(b6KbKbGb#c ''%%=#'%) ( 	
 ;!%!A!ABW!X!]!]0(;;;;/555*<*B*B:*N*S*S'!"97CCCC*6;R;W;W;c 7 < <I%i>>>>-6y7J7J-K)#+x/B/B4/H/HPXPcPcdgPhPh$151D1DYEXEXY`Ea1b.1=(NdBd 6L5R5R 7	8W8W X62 $'x#HHX7MtU\$]^ .L ,,V<<h-CKKgi.@.@&A4ST499dii$HJWrS   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# r  rO   )rP   s   "rQ   rR   r/    s<     &
 &
(&
  &
 	&

 &
 
&
rS   c                f   V P                   P                  \         R2V P                   P                  \         R24      .4      p\        V\	        4       .4      p\        \        RV4      VR\        4      p\        P                  ! V P                   P                  P                  4      ;_uu_ 4        V P                  VR\        VP                  4      RRVVR7      pRRR4       V P                  W4      '       gD   \        R4      p	XP!                  \        V	\#        \$        P&                  4      R\(        4      4       V'       d   XV.,           M	V.X,           p\+        V P                   V P,                  R	V\/        V P,                  P0                  4      RR
7       R#   + '       g   i     L; i)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   rD  r   r  model_construct)r   r  is_classmethod)r3  
named_typeBUILTINS_NAMEr?   r:   r   r)   r   r4   r   rZ   r   r  r   r   r  r  r7   r<   r   r   r  r1  rA   r   )
re   r8  r   rD  r   set_stroptional_set_strfields_set_argumentr   r  s
   &&&&&     rQ   r>  3PydanticModelTransformer.add_model_construct_method  sX    ))&&-'=		@T@TXeWffjUk@l?mn$gxz%:;&s=:J'KM]_celm&&tyy'8'8'H'HII++!&--0).'+ , D J ,,V<<h-CKKgi.@.@&A4ST/<t*++CVBWZ^B^IIII%diinn5	
! JIs   2,F  F0	c               (    V ^8  d   QhRRRRRRRR/# )	rK   r8  r  r   r0   r7  r   rN   r[   rO   )rP   s   "rQ   rR   r/    s2     B B!9 B@_ Bim Brv BrS   c                   V P                   P                  pV EF-  pVP                  P                  VP                  4      pVe   VP
                  p\        V\        4      '       d   T;'       g    VP                  Vn	        Kl  \        V\        4      '       d;   V P                  P                  '       g   V P                  P                  4        K  K  K  VP                  WBRR7      pWGn        W7n	        VP                  R,           VP                  ,           Vn        \#        \$        V4      VP                  VP                  &   EK0  	  R# )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.
NF)r   .)r1  r   rS  r   r   rn   rm   r)   r   is_propertyr!   r3  final_iterationdeferr   rj   	_fullnamer%   r   )re   r8  r   r7  r   rC  r  r  s   &&&&    rQ   r?  #PydanticModelTransformer.set_frozen  s    
 yy~~Ezz~~ejj1H#mmc3''&,&?&?CO_55dii>W>W>WIIOO% ?X5 ll4l>"( $ 3chh >'6tS'A

388$# rS   c               (    V ^8  d   QhRRRRRRRR/# )	rK   r   rM   r  r   rb  r   rN   ModelConfigData | NonerO   )rP   s   "rQ   rR   r/    s)     ! !c !
 !t !Xn !rS   c                P   WP                   9  d   R# VR8X  dy   \        V\        4      '       d   VP                  R8H  pMF\        V\        4      '       d   VP
                  R8H  pM V'       g   \        WP                  V4       R# \        VR7      # VR8X  d8   Rp\        V\        4      '       d   VP                  R8X  d   Rp\        VR	7      # \        V\        4      '       d+   VP                  R9   d   \        R/ WP                  R
8H  /B # \        WP                  V4       R# )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)
Nextraforbid)forbid_extraalias_generatorTbuiltins.NoneF)ro  builtins.True)r  builtins.FalserO   )r-  rm   r$   rM  r   r   error_invalid_config_valuer3  r_  r   rj   )re   r   r  rb  r  ro  s   &&&&  rQ   rg  *PydanticModelTransformer.get_config_update  s    
 1117?#w''"yyH4C,,"xx83  /tYYD"==$$"&#x((S\\_-L&+#"7JKKc8$$9\)\"MdLLO,K%LMM"4C8rS   c                    V ^8  d   QhRRRR/# rK   rz  r   rN   r   rO   )rP   s   "rQ   rR   r/    s     2 2n 2 2rS   c                   V P                   p\        V\        4      '       d   R# \        V\        4      '       d   \        VP                  \
        4      '       d   VP                  P                  \        8X  d   \        VP                  VP                  4       FY  w  r#Ve   VR8X  d   VP                  \        Ju # VR8X  g   K-  \        V\        4      ;'       d    VP                  R8H  '       * u # 	  R# \        V\        4      '       * # )zUReturns a boolean indicating whether the field defined in `stmt` is a required field.Fr  default_factoryr  )rl  rm   r&   r   rV  r"   rj   FIELD_FULLNAMErm  r   rL  rf   r   r   rz  rx  r  r   s   &   rQ   r  (PydanticModelTransformer.get_has_default  s     {{dH%%dH%%*T[['*J*Jt{{OcOcguOu
 !DNN;	<49#4==<<,, *3 9 ] ]cllo>]^^ < dL111rS   c                    V ^8  d   QhRRRR/# )rK   rz  r   rN   r   rO   )rP   s   "rQ   rR   r/    s       K rS   c                   V P                   p\        V\        4      '       d   \        VP                  \        4      '       d   VP                  P
                  \        8X  dr   \        VP                  VP                  4       FM  w  r#VR8w  d   K  \        V\        4      '       d)   VP
                  R8X  d    R# VP
                  R8X  d    R#  R# 	  R# )zEReturns a the `strict` value of a field if defined, otherwise `None`.r   r  Tr  FN)rl  rm   r   rV  r"   rj   r  rm  r   rL  r   r  s   &   rQ   r  #PydanticModelTransformer.get_strict  s     {{dH%%*T[['*J*Jt{{OcOcguOu DNN;	8#c8,,||6#)99$ < rS   c                    V ^8  d   QhRRRR/# )rK   rz  r   rN   ztuple[str | None, bool]rO   )rP   s   "rQ   rR   r/    s      ^ 0G rS   c                @   V P                   p\        V\        4      '       d   R# \        V\        4      '       d@   \        VP                  \
        4      '       d    VP                  P                  \        8X  g   R# RVP                  9   d.   VP                  VP                  P                  R4      ,          pM@RVP                  9   d.   VP                  VP                  P                  R4      ,          pMR# \        V\        4      '       d   VP                  R3# R# )zReturns 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.
Fvalidation_aliasr   )NF)NT)rl  rm   r&   r   rV  r"   rj   r  rL  r   indexr$   rM  )rz  rx  r  s   &  rQ   r  'PydanticModelTransformer.get_alias_info  s     {{dH%% tX&&:dkk7+K+KPTP[P[PdPdhvPv /))DNN001CDEC&))DNN009:Cc7##99e##rS   c                    V ^8  d   QhRRRR/# r  rO   )rP   s   "rQ   rR   r/  0  s      n  rS   c                   V P                   p\        V\        4      '       d   R# \        V\        4      '       d@   \        VP                  \
        4      '       d    VP                  P                  \        8X  g   R# \        VP                  4       FH  w  r#VR8X  g   K  VP                  V,          p\        V\        4      ;'       d    VP                  R8H  u # 	  R# )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.
Fr7  r  )rl  rm   r&   r   rV  r"   rj   r  rZ  rL  r   r   )rz  rx  rO  r|  r  s   &    rQ   r  (PydanticModelTransformer.is_field_frozen/  s     {{dH%% tX&&:dkk7+K+KPTP[P[PdPdhvPv $T^^4KA8#iil!#x0TTS\\_5TT 5 rS   c               <    V ^8  d   QhRRRRRRRRRRRRR	RR
RRR/	# )rK   r8  r  r   r   r   r   r  rD  r   r   rN   list[Argument]rO   )rP   s   "rQ   rR   r/  H  sd      (  	
  #'   #' 
rS   c	                   V P                   P                  p	V U
u. uFc  p
V'       d   V
P                  '       d   K  T
P                  T	TTT;'       g    TTV P                  TT;'       d    V
P
                  R8H  R7      NKe  	  pp
V# u up
i )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.
r   )r   r   r   r   r   r   r   )r1  r   r   r   r3  r   )re   r8  r   r   r   r  rD  r   r   r   rC  	argumentss   &&&&&&&&&   rQ   r  ,PydanticModelTransformer.get_field_argumentsH  s     yy~~  
  %"9"9	E)7FF;#II)A#0#I#IUZZ65I  	   	 
 
s   BBBB+Bc               $    V ^8  d   QhRRRRRR/# )rK   r8  r  r   r_  rN   r   rO   )rP   s   "rQ   rR   r/  h  s$     4 4/G 4Q` 4ei 4rS   c                    VP                   '       g@   VP                  '       g.   V P                  V\        VP                  4      4      '       d   R# VP
                  '       d   R# V P                  P                  # )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)rp  rq  is_dynamic_alias_presentr   ro  r  r`   r   )re   r8  r   s   &&&rQ   r  1PydanticModelTransformer.should_init_forbid_extrah  s]     '''6+B+B+B,,VT&:T:T5UVV!!333rS   c               $    V ^8  d   QhRRRRRR/# )rK   r8  r  ro  r   rN   rO   )rP   s   "rQ   rR   r/  v  s$      )A X\ ae rS   c                    V  F  pVP                   '       g   K   R# 	  V'       d   V  F  pVP                  e   K   R# 	  R# )zReturns whether any fields on the model have a "dynamic alias", i.e., an alias that cannot be
determined during static analysis.
TF)r   r   )r8  ro  rC  s   && rQ   r  1PydanticModelTransformer.is_dynamic_alias_presentu  s>    
 E&&&  ;;&   rS   )r3  r1  r2  r`   N>   r  r7  r   r  r   rq  rp  r  r  )r   r   r   r   r   r-  r   rd   r   r@  r:  r;  r  r  r  r  r=  r>  r?  rg  staticmethodr  r  r  r  r  r  r  r   rO   rS   rQ   r   r     s    	'8 	+"H26JXBLHRSG
R$L4Xl&
PB2!F 2 2*    :  0@4  rS   r   c                  >   a  ] tR tRtRtR V 3R lltR R ltRtV ;t# )r  i  z<A type translator used to change type of Any's, if explicit.c                    V ^8  d   QhRRRR/# )rK   type_of_anyr   rN   r[   rO   )rP   s   "rQ   rR   $ChangeExplicitTypeOfAny.__annotate__  s      C D rS   c                	0   < Wn         \        SV `	  4        R # r^   )_type_of_anyrc   rd   )re   r  rf   s   &&rQ   rd    ChangeExplicitTypeOfAny.__init__  s    'rS   c                    V ^8  d   QhRRRR/# )rK   r  r7   rN   r;   rO   )rP   s   "rQ   rR   r    s      7 t rS   c                	|    VP                   \        P                  8X  d   VP                  V P                  R 7      # V# ))r  )r  r<   r   r   r  )re   r  s   &&rQ   	visit_any!ChangeExplicitTypeOfAny.visit_any  s0    ==I...??t/@/@?AAHrS   )r  )	r   r   r   r   r   rd   r"  r   r   r   s   @rQ   r  r    s    F  rS   r  c                  N    ] tR tRtRtRR R lltR R ltR R	 ltR
 R ltRt	R# )r_  i  z(Pydantic mypy plugin model config class.Nc               8    V ^8  d   QhRRRRRRRRRRRRRRR	R/# )
rK   r  r   r7  r   rq  r  rp  ro  r   rO   )rP   s   "rQ   rR   ModelConfigData.__annotate__  sZ      !  %	
 & ' & ) rS   c	                	f    Wn         W n        W0n        W@n        WPn        W`n        Wpn        Wn        R # r^   )r  r7  r   rq  r  rp  ro  r   )	re   r  r7  r   rq  r  rp  ro  r   s	   &&&&&&&&&rQ   rd   ModelConfigData.__init__  s2     ). 0!2 0#6 rS   c                   V ^8  d   QhRR/# r   rO   )rP   s   "rQ   rR   r&    s     I I IrS   c                v    V P                   P                  4        UUu/ uF  w  rVf   K  WbK  	  upp# u uppi )zvReturns a dict of Pydantic model config names to their values.

It includes the config if config value is not `None`.
)__dict__rf  )re   kvs   &  rQ   rA  ModelConfigData.get_values_dict  s3    
 "&!4!4!6H!6!!6HHHs   55c                    V ^8  d   QhRRRR/# )rK   r   r  rN   r[   rO   )rP   s   "rQ   rR   r&    s        3    rS   c                x    Vf   R# VP                  4       P                  4        F  w  r#\        WV4       K  	  R# )z$Update Pydantic model config values.N)rA  rf  r   )re   r   r,  r-  s   &&  rQ   rh  ModelConfigData.update  s2    >**,224DADQ 5rS   c               $    V ^8  d   QhRRRRRR/# )rK   r   rM   rM  r   rN   r[   rO   )rP   s   "rQ   rR   r&    s!     & &c &# &$ &rS   c                <    \        W4      f   \        WV4       R# R# )zFSet default value for Pydantic model config if config value is `None`.N)r   r   )re   r   rM  s   &&&rQ   ru  ModelConfigData.setdefault  s    4%Du% &rS   )r  r   r7  ro  rq  r   r  rp  )NNNNNNNN)
r   r   r   r   r   rd   rA  rh  ru  r   rO   rS   rQ   r_  r_    s    2(I & &rS   r_  c                    V ^8  d   QhRRRR/# )rK   r   r(   rN   r   rO   )rP   s   "rQ   rR   rR     s     . . .T .rS   c                ,    V P                  \        4      # )zXReturn whether the type info is a root model subclass (or the `RootModel` class itself).)ro   ROOT_MODEL_FULLNAME)r   s   &rQ   r   r     s    ==,--rS   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 subclassc               (    V ^8  d   QhRRRRRRRR/# )	rK   
model_namerM   r   r+   r   r   rN   r[   rO   )rP   s   "rQ   rR   rR     s1     \ \c \0F \QX \]a \rS   c                >    VP                  RV  R2V\        R7       R# )zCEmits an error when the model does not have `from_attributes=True`.r  z$" does not have from_attributes=TruecodeN)rn  	ERROR_ORM)r:  r   r   s   &&&rQ   r   r     s    HHq@A7QZH[rS   c               (    V ^8  d   QhRRRRRRRR/# )	rK   r   rM   r   r0   r   r   rN   r[   rO   )rP   s   "rQ   rR   rR     s1     O OS O/N OY` Oei OrS   c                >    VP                  RV  R2V\        R7       R# )z0Emits an error when the config value is invalid.zInvalid value for "Config.r  r<  N)rn  ERROR_CONFIG)r   r   r   s   &&&rQ   r  r    s    HH)$q17HNrS   c               $    V ^8  d   QhRRRRRR/# rK   r   r0   r   r   rN   r[   rO   )rP   s   "rQ   rR   rR     s)     O O(G ORY O^b OrS   c                6    V P                  RV\        R7       R# )zfEmits required dynamic aliases error.

This will be called when `warn_required_dynamic_aliases=True`.
z#Required dynamic aliases disallowedr<  N)rn  ERROR_ALIASr   r   s   &&rQ   rr  rr    s    
 HH2G+HNrS   c               (    V ^8  d   QhRRRRRRRR/# )	rK   r   rM   r   z8CheckerPluginInterface | SemanticAnalyzerPluginInterfacer   r   rN   r[   rO   )rP   s   "rQ   rR   rR     s,     ; ;;N;Y`;	;rS   c                ^    RpRV  R2pVRV R2,          pVP                  WB\        R7       R# )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)rn  ERROR_UNEXPECTED)r   r   r   linkfull_messages   &&&  rQ   r   r     s?    
 DDLVHTVWL<TFB[\\LHH\)9H:rS   c               $    V ^8  d   QhRRRRRR/# rC  rO   )rP   s   "rQ   rR   rR     s(     G G= G GTX GrS   c                6    V P                  RV\        R7       R# )z;Emits an error when there is an untyped field in the model.zUntyped fields disallowedr<  N)rn  ERROR_UNTYPEDrF  s   &&rQ   r  r    s    HH('HFrS   c               $    V ^8  d   QhRRRRRR/# )rK   r   r+   r   r   rN   r[   rO   )rP   s   "rQ   rR   rR     s(     o o*@ o7 oW[ orS   c                6    V P                  RV\        R7       R# )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)rn  ERROR_EXTRA_FIELD_ROOT_MODELrF  s   &&rQ   r  r    s    HHA7QmHnrS   c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# )rK   r   z8SemanticAnalyzerPluginInterface | CheckerPluginInterfacer   r   r   rM   r   r  r  r;   r   r   tvar_defzTypeVarType | Noner  r   rN   r[   rO   )rP   s   "rQ   rR   rR     sm     U% U%	AU%	U% U% 	U%
 U% U% !U% U% 
U%rS   c           	        VP                   pW(P                  9   du   VP                  V,          p	V	P                  '       dP   \        V	P                  \
        4      '       d0   VP                  P                  P                  V	P                  4       \        V \        4      '       d   V P                  R4      p
MV P                  R. 4      p
V'       d=   T;'       g    \        \        V4      4      p\        \        R4      VR\         R4      .pM1T;'       g    \        V4      p\        \        R4      VR\         4      .pW,           p. . . rpV Fw  pVP"                  '       g   Q R4       hVP%                  VP"                  4       VP%                  VP&                  P(                  4       VP%                  VP*                  4       Ky  	  \-        YYY'       d   V.MRR7      p\        W#\/        \1        4       .4      4      pVVn         \3        VV4      Vn        VVn        VP8                  R,           V,           Vn        VP<                  Vn        W(P                  9   d6   \?        W(P                  4      pVP                  V,          VP                  V&   V'       dv   RVn         \        VVP4                  4      pVVn         VP:                  Vn        RVn!        \E        V\G        R	4      .V4      pVP<                  Vn        \I        \J        V4      p	M\I        \J        V4      p	RV	n        WP                  V&   VPL                  P                  P                  P%                  V4       R# )
zhVery closely related to `mypy.plugins.common.add_method_to_class`, with a few pydantic-specific changes.zbuiltins.functionr1  NT__pydantic_self__z"All arguments must be fully typed.)	variablesr  r  )'r   rS  r  rm   rn   r   ri  rj  remover0   r  named_generic_typer=   rA   r   r)   r   r   r  r   r   r   r8   r   r    r2   r   r\  rj   r  r   rB   is_decoratedr  r   r   r%   r   defn)r   r   r   r   r  r   rT  r  r   rr   function_typefirstr  rL  r  r  	signaturer[  r_namer-  decs   &&&&&&&&             rQ   r  r    s    88D zzjjJsxx$A$AHHMM  *#677':;../BBG>>-*=!>	#f+y$FG44t!4	 #12ItWMN<D&("b)I"""H$HH",,-**+"	  im]ePXzkoI 4uhj\23DDI!)T2DI"DM]]S(4/DN		DI zz-dJJ?!ZZ-

6
  dii nnx67;99dC(dD)CJJtIINNt$rS   c                    V ^8  d   QhRRRR/# )rK   r   rM   rN   zdict[str, Any] | NonerO   )rP   s   "rQ   rR   rR   J  s      C $9 rS   c                L   V P                  R4      '       g   R# \        P                  R8  d   ^ RIpM ^ RIp\        V R4      ;_uu_ 4       pVP                  V4      uuRRR4       #   \
         d    ^ RIpTP                  R^R7        R# i ; i  + '       g   i     R# ; i)z}Returns 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.tomlNzJNo TOML parser installed, cannot read configuration from `pyproject.toml`.)
stacklevelrb)      )
r~   sysversion_infotomllibtomliImportErrorwarningswarnopenload)r   toml_rl  rfs   &   rQ   r   r   J  s    
 ((
7"	! 
k4	 	 Bzz"~ 
!	   	MMfstMu		 
!	 	 s   A) B)"BBB#	>   *pydantic.functional_serializers.serializer.pydantic.deprecated.class_validators.validator.pydantic.functional_validators.field_validatorrG   rH   3pydantic.deprecated.class_validators.root_validator)NNF)r   
__future__r   rg  collections.abcr   configparserr   typingr   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.   r/   r0   mypy.plugins.commonr1   mypy.semanalr2   mypy.server.triggerr3   
mypy.stater4   mypy.type_visitorr5   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   rp   r<  r7  rw   r  DATACLASS_FULLNAMErX  r  rW  MYPY_VERSION_TUPLEr  rV   rU   r_   r   r   r!  r   r  r_  r   r>  rA  rE  rJ  rO  ERROR_FIELD_DEFAULTSrR  r   r  rr  r   r  r  r  r   rO   rS   rQ   <module>r     s   d " 
 $ %   % @! ! ! ! ! ! ! ! !D !  + 5  , 0   ( 2 4 & / '. = 5 R (5 K   ,?BtAu+u ( (5  3@V 3@l+C +C\#4PT PTf
 
2[ [|n (& (&V.
 n&DjQ	*,BJO(*DjQ24I:V *,F
S !13KZX ()9;^`jk \
O
O;G
o
U%prS   