Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
mypy.cpython-313.pyc342 linesDownload Raw Back to __pycache__
1�

2��j+�����SrSSKJr SSKrSSKJr SSKJr SSKJ	r	J3r4 SSKJr SSK
JrJr SS	KJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0 SS5K1J2r2 SSK3J4r4J5r5J6r6J7r7J8r8J9r9J:r: SSK;J<r< SS
K=J>r> SSK?J@r@ SSKAJBrB SSKCJDrD SSKEJFrF SSKGJHrHJIrIJJrJJKrKJLrLJMrMJNrNJOrOJPrPJQrQ SSKRJSrS SSKTJUrU SSKVJWrX SSKYJZrZ SSK[J\r\ Sr]Sr^Sr_Sr`SraSrbSrcSrdS reS!rf1S"krg\gS#1-6rh\\"\X5riS$rjS%rWSLS&jrk"S'S(\85rl"S)S*5rmSMS+jrn"S,S-5ro"S.S/5rp"S0S15rq"S2S3\D5rr"S4S55rsSNS6jrt\"S7S8S95ru\"S:S;S95rv\"S<S=S95rw\"S>S?S95rx\"S@SAS95ry\"S@SBS95rz\"S@SCS95r{SOSDjr|SPSEjr}SQSFjr~SRSGjrSQSHjr�SSSIjr�STSUSJjjr�SVSKjr�g)Wz^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�7Expression�FuncDef�IfStmt�JsonDict�8MemberExpr�NameExpr�PassStmt�PlaceholderNode�RefExpr�	Statement�StrExpr�SymbolTableNode�TempNode�	TypeAlias�TypeInfo�Var)�Options)�CheckerPluginInterface�ClassDefContext�DynamicClassDefContext�
MethodContext�Plugin�ReportConfigContext�SemanticAnalyzerPluginInterface)�deserialize_and_fixup_type)�set_callable_name)�make_wildcard_trigger)�state)�TypeTranslator)�map_type_from_supertype)9�AnyType�CallableType�Instance�NoneType�Type�	TypeOfAny�TypeType�TypeVarType�	UnionType�get_proper_type)�
fill_typevars)�get_unique_redefinition_name)�__version__)�_fields)�parse_mypy_version�
pydantic-mypyzpydantic-mypy-metadatazpydantic.main.BaseModelzpydantic.main.create_modelz#pydantic_settings.main.BaseSettingszpydantic.root_model.RootModelz5pydantic._internal._model_construction.ModelMetaclasszpydantic.fields.Fieldzpydantic.dataclasses.dataclass�.pydantic.functional_validators.model_validator>�*pydantic.functional_serializers.serializer�.pydantic.deprecated.class_validators.validator�.pydantic.functional_validators.field_validatorrI�0pydantic.functional_serializers.model_serializer�3pydantic.deprecated.class_validators.root_validatorrM�builtins�c��[$)a`version` is the mypy version string.10 11We might want to use this to print a warning if the mypy version being used is12newer, or especially older, than we expect (or need).13 14Args:15    version: The mypy version string.16 17Return:18    The Pydantic mypy plugin type.19)�PydanticPlugin)�versions �SD:\code\apps\devtools\python\user_packages\Python313\site-packages\pydantic/mypy.py�pluginrUos20����c�^�\rSrSrSrS
U4SjjrSSjrSSjrSSjrSSjr	SSjr21SS	jrSS22jrSSjr
SrU=r$)rR�~zThe Pydantic mypy plugin.c�>�[U5UlURR5Ul[TU]U5 g�N)�PydanticPluginConfig�
plugin_config�to_data�_plugin_data�super�__init__)�self�options�	__class__s  �rTr`�PydanticPlugin.__init__�s4���1�'�:��� �.�.�6�6�8���
����!rVc���URU5nU(aO[UR[5(a0URR	[235(aUR$g)zUpdate Pydantic model class.N)�lookup_fully_qualified�24isinstance�noder)�has_base�BASEMODEL_FULLNAME�$_pydantic_model_class_maker_callback)ra�fullname�syms   rT�get_base_class_hook�"PydanticPlugin.get_base_class_hook�sJ���)�)�(�3���:�c�h�h��1�1��x�x� � �!3�4�4��@�@�@�rVc�0�U[:XaUR$g)z,Update Pydantic `ModelMetaclass` definition.N)�MODEL_METACLASS_FULLNAME�)_pydantic_model_metaclass_marker_callback�rarls  rT�get_metaclass_hook�!PydanticPlugin.get_metaclass_hook�s���/�/��A�A�A�rVc�<�URS5(a[$g)z-Adjust return type of `from_orm` method call.z	.from_ormN)�endswith�from_attributes_callbackrss  rT�get_method_hook�PydanticPlugin.get_method_hook�s�����[�)�)�+�+�rVc�0�U[:XaUR$g)zARecognize `create_model()` calls as dynamic BaseModel subclasses.N)�CREATE_MODEL_FULLNAME�_pydantic_create_model_callbackrss  rT�get_dynamic_class_hook�%PydanticPlugin.get_dynamic_class_hook�s���,�,��7�7�7�rVc��UR$)zZReturn all plugin config data.25 26Used by mypy to determine if cache needs to be discarded.27)r^)ra�ctxs  rT�report_config_data�!PydanticPlugin.report_config_data�s��28� � � rVc��[URURURUR5nUR5 grZ)�PydanticModelTransformer�cls�reason�apir\�	transform)rar��transformers   rTrk�3PydanticPlugin._pydantic_model_class_maker_callback�s0��.�s�w�w��29�30�C�G�G�T�M_�M_�`�����rVc���URR(agURRRnU(dS5e[URSS5(aSURlgg)z�Reset dataclass_transform_spec attribute of ModelMetaclass.31 32Let the plugin handle it. This behavior can be disabled33if 'debug_dataclass_transform' is set to True', for testing purposes.34Nz-callback not passed from 'get_metaclass_hook'�dataclass_transform_spec)r\�debug_dataclass_transformr��info�declared_metaclass�getattr�typer�)rar��info_metaclasss   rTrr�8PydanticPlugin._pydantic_model_metaclass_marker_callback�sa�����7�7�������8�8���N�N�N�~��>�&�&�(B�D�I�I�;?�N���8�JrVc��[n[URRURR5H�up4US:XdM
[U[5(dM$URcM3[UR[5(aURRnMj[UR[5(dM�[URR[5(dM�URRRRnM� URRU5nUb[UR[5(dBURR[5nUb[UR[5(dgURn[U5n[U[5(deURR!UR"XqRR$5nUR&UlURR)UR"[+[,U55 g)zFMake variables assigned from `create_model()` usable as types by mypy.�__base__N)rj�zip�call�	arg_names�argsrgr#rhr)rlr*r�r;r��lookup_fully_qualified_or_nonerC�basic_new_typeinfo�name�line�metaclass_type�add_symbol_table_noder&r)	rar��
base_fullname�arg_name�arg_expr�base_sym�	base_info�
base_instancer�s	         rTr}�.PydanticPlugin._pydantic_create_model_callback�s��+�
�"%�c�h�h�&8�&8�#�(�(�-�-�"H��H��:�%�*�X�w�*G�*G�H�M�M�Le��h�m�m�X�6�6�$,�M�M�$:�$:�M���
�
�s�3�3�35�8�=�=�CU�CU�W_�8`�8`�$,�M�M�$6�$6�$;�$;�$D�$D�M�#I��7�7�9�9�-�H����:�h�m�m�X�#F�#F��w�w�=�=�>P�Q�H���z�(�-�-��'J�'J���M�M�	�%�i�0�
��-��2�2�2�2��w�w�)�)�#�(�(�M�8�8�=�=�Q��'�6�6������%�%�c�h�h���d�0K�LrV)r^r\�rbr+�return�None)rl�strr�z(Callable[[ClassDefContext], None] | None)rlr�r�z&Callable[[MethodContext], Type] | None)rlr�r�z/Callable[[DynamicClassDefContext], None] | None)r�r1r��dict[str, Any])r�r-r�r�)r�r.r�r�)�__name__�36__module__�__qualname__�__firstlineno__�__doc__r`rnrtryr~r�rkrrr}�__static_attributes__�
__classcell__�rcs@rTrRrR~s;���#�"�37����!� �@�M�MrVrRc�Z�\rSrSr%SrSrS\S'S\S'S\S'S\S'S
S	jrSS38jrSr	g)r[��a�A Pydantic mypy plugin config holder.39 40Attributes:41    init_forbid_extra: Whether to add a `**kwargs` at the end of the generated `__init__` signature.42    init_typed: Whether to annotate fields in the generated `__init__`.43    warn_required_dynamic_aliases: Whether to raise required dynamic aliases error.44    debug_dataclass_transform: Whether to not reset `dataclass_transform_spec` attribute45        of `ModelMetaclass` for testing purposes.46)�init_forbid_extra�47init_typed�warn_required_dynamic_aliasesr��boolr�r�r�r�c���URcg[UR5nUbwURS05RS05nURHDnURUS5n[	U[485(d[
SU35e[XU5 MF g[5nURUR5 URH$nUR[USS9n[XU5 M& g)N�toolrHFz/Configuration value must be a boolean for key: )�fallback)�config_file�49parse_toml�get�	__slots__rgr��50ValueError�setattrr�read�51getboolean�CONFIGFILE_KEY)rarb�toml_config�config�key�settingr\s       rTr`�PydanticPluginConfig.__init__�s������&�� ��!4�!4�5���"� �_�_�V�R�0�4�4�_�b�I�F��~�~�� �*�*�S�%�0��!�'�4�0�0�$�'V�WZ�V[�%\�]�]���7�+�	&�)�N�M����w�2�2�3��~�~��'�2�2�>�3�QV�2�W����7�+�&rVc�X�URVs0sHo[X5_M sn$s snf)z/Returns a dict of config names to their values.)r�r�)rar�s  rTr]�PydanticPluginConfig.to_data�s&��37�>�>�B�>�C�W�T�'�'�>�B�B��Bs�'�Nr��r�r�)52r�r�r�r�r�r��__annotations__r`r]r�r�rVrTr[r[�s3����I�����#'�'�#�#�,�&CrVr[c�>�URn[U[5(aURn[U[5(a,[UR53[5(a
UR54nOa[U[5(aUnOISUSURRS3n[X0RUR5 UR$URRR[5nUcUR$URR!["5(dUR$URS05RS5nUSLa5[%URR&URUR5 UR$)z1Raise an error if from_attributes is not enabled.z55ctx.type: z56 (of type �)r��from_attributesT)r�rgr?�itemr:�ret_typer;rcr��error_unexpected_behaviorr��context�default_return_type�metadatar��METADATA_KEYrirj�error_from_attributesr�)r��ctx_type�57model_type�detail�pydantic_metadatar�s      rTrxrxs=���x�x�H��(�H�%�%��=�=���(�L�)�)�j��9J�9J�H�.U�.U��&�&�58�	�H�h�	'�	'��59��h�Z�z�(�2D�2D�2M�2M�1N�a�P��!�&�'�'�3�;�;�?��&�&�&�"���0�0�4�4�\�B��� ��&�&�&��?�?�#�#�$6�7�7��&�&�&�'�+�+�H�b�9�=�=�>O�P�O��d�"��j�o�o�2�2�C�G�G�S�[�[�I��"�"�"rVc���\rSrSrSrSSjrS
SjrSSSjjrSSSjjrSSjr	\60SSj5rSS	jrS61r
g)�PydanticModelFieldiz5Based on mypy.plugins.dataclasses.DataclassAttribute.c�|�XlX lX0lX@lXPlX`lXplX�lX�lX�l	grZ)62r��alias�	is_frozen�has_dynamic_alias�has_default�strictr��columnr�r�)rar�r�r�r�r�r�r�r�r�r�s           rTr`�PydanticModelField.__init__ s8���	��63�"��!2��&�����	����	��	rVc	�J�URXXW5n	URcUOURn64U(dU65(aURXSS9nO[[R665n[
U	USU(a[S9$U(dUR(a[S9$[S9$)zABased on mypy.plugins.dataclasses.DataclassAttribute.to_argument.NT)�include_root_type)�variable�type_annotation�initializer�kind)�to_varr�r	r9r>�explicitrr
r�rr)ra�current_info�typed�model_strict�force_optional�	use_aliasr��force_typevars_invariant�is_root_model_rootr�r�r�s            rT�to_argument�PydanticModelField.to_argument8s����;�;�|�)�V��!%���!4��$�+�+���F�"�.�.�|�TX�.�Y�O�%�i�&8�&8�9�O���+��!��	67�	68�$2�T�5E�5E�-�
69�	70�LU�
71�	72rVc��U(aJ[UR[5(a+URR5n[UlXPlURGbVURRGb>[R"URR5 [U5n[U[5(deU(a5URH%n[U[5(dM[UlM' [URURRR U05nU(am[U[5(aX[#UR5(a>URSRn	U	cUsSSS5 $[%X�5n73['X�/5nUsSSS5 $UR$!,(df   UR$=f)zABased on mypy.plugins.dataclasses.DataclassAttribute.expand_type.N�root)rgr�r@�
copy_modifiedr�variancer��	self_typer6�strict_optional_setrb�strict_optionalrCr;r�r	�id�
is_root_modelr74rA)rar�r�r�r��
modified_type�filled_with_typevars�arg�
expanded_type�	root_type�expanded_root_types           rTr	�PydanticModelField.expand_typeUsn��$�75�$�)�)�[�1�1� $�	�	� 7� 7� 9�
�)2�
�&�)�	��9�9� �T�Y�Y�%8�%8�%D�76�*�*�3�;�;�+F�+F�G�'4�\�'B�$�!�"6��A�A�A�A�+�3�8�8��%�c�;�7�7�+4�C�L� 9�!,�D�I�I��	�	�8K�8K�8N�8N�Pd�7e� f�
�$��M�8�)L�)L�Q^�_l�_q�_q�Qr�Qr�!.� 2� 2�6� :� ?� ?�I� �(�,�!H�G�"*A��)Z�&�$-�}�.Q�$R�M�$�'H�G�(�y�y��)H�G�(�y�y��s�"AG�2BG�G�77Gc��U(aURb
URnOURn[XPRXU55$)z<Based on mypy.plugins.dataclasses.DataclassAttribute.to_var.)r�r�r*r	)rar�r�r�r�r�s      rTr��PydanticModelField.to_var�s;������/��:�:�D��9�9�D��4�)�)�,�=U�V�W�WrVc78��UR(deURURURURUR79URURURURR5S.	$)�?Based on mypy.plugins.dataclasses.DataclassAttribute.serialize.)	r�r�r�r�r�r�r�r�r�)80r�r�r�r�r�r�r�r�r��	serialize�ras rTr�PydanticModelField.serialize�sd���y�y��y��I�I��Z�Z����!%�!7�!7��+�+��k�k��I�I��k�k��I�I�'�'�)�8182�83	84rVc�l�UR5n[URS5U5nU"SXAS.UD6$)�ABased on mypy.plugins.dataclasses.DataclassAttribute.deserialize.r�)r�r�r�)�copyr3�pop)r�r��datar��typs     rT�deserialize�PydanticModelField.deserialize�s7���y�y�{��(����&�)9�3�?���/��/�$�/�/rVc���URbY[R"URR5 [URXR5UlSSS5 gg!,(df   g=f)zhExpands type vars in the context of a subtype when an attribute is inherited85from a generic super type.86N)r�r6rrbrr8r�)ra�sub_typer�s   rT�expand_typevar_from_subtype�.PydanticModelField.expand_typevar_from_subtype�sQ���9�9� ��*�*�3�;�;�+F�+F�G�3�D�I�I�x���S��	�H�G�!�G�G�s�&A(�(87A6)88r�r�r�r�r�r�r�r�r�r�N)r�r�r�z89str | Noner�r�r�r�r�r�r��bool | Noner��intr�rr��Type | Noner�r))r�r)r�r�r�r�r�r�r�r�r�r2r�r�r�r�r�r)FF)90r�r)r�r2r�r�r�r�r�r �F)91r�r)r�r2r�r�r�r�r�r*�r�r)r�r)rrr�r2r�r�)rr)r�r2r�r�)r�r�r�r�r�r`r�r	r�r�classmethodrrr�r�rVrTr�r�sg��?�������	�92 ���
�����������093��94��95��	96�97�98��
99�-�100�#'�101�!�102�103�104�B*/�"'�+��+�-�+�#'�	+�105 �+�106�
+�d*/�
X��
X�-�
X��	
X�107#'�
X�108
�

X�
109��0��0�TrVr�c�<�\rSrSrSrSr\SSj5rS	SjrSr	g)110�PydanticModelClassVari�z�Based on mypy.plugins.dataclasses.DataclassAttribute.111 112ClassVars are ignored by subclasses.113 114Attributes:115    name: the ClassVar name116c��XlgrZ�r�)rar�s  rTr`�PydanticModelClassVar.__init__�s���	rVc�2�UR5nU"S0UD6$)rr�)r)r�rs  rTr�!PydanticModelClassVar.deserialize�s���y�y�{���{�T�{�rVc��SUR0$)rr�r'rs rTr�PydanticModelClassVar.serialize�s��
�D�I�I�117�	118rVr'N)rrr�r%r")119r�r�r�r�r�r`r#rrr�r�rVrTr%r%�s%��������120121rVr%c��\rSrSr%Sr1SkrS\S'SSjrSSjrSSjr	SS	jr122S S123jrS!SjrS"Sjr
S#S
jrS$SjrS%SjrS%SjrS&SjrS'S(Sjjr\S)Sj5r\S*Sj5r\S+Sj5r\S)Sj5rS'S,SjjrS-Sjr\S.Sj5rSrg)/r�i�z�Transform the BaseModel subclass according to the plugin settings.124 125Attributes:126    tracked_config_fields: A set of field configs that the plugin has to track their value.127>�extra�frozenr��alias_generatorr��populate_by_name�validate_by_name�validate_by_aliaszset[str]�tracked_config_fieldsc�4�XlX lX0lX@lgrZ)�_cls�_reason�_apir\)rar�r�r�r\s     rTr`�!PydanticModelTransformer.__init__�s���	����	�*�rVc��URRn[U5nUR5nUR	X25upEUbUcgUHnUR128bM g UR
[5nURXCXr5 URXCXr5 URX@RURSLS9 UR5 UVs0sHofRUR5_M snUVs0sHo�RUR5_M snUR!5S.UR"[$'gs snfs snf)aVConfigures the BaseModel subclass according to the plugin settings.129 130In particular:131 132* determines the model config and fields,133* adds a fields-aware signature for the initializer and construct methods134* freezes the class if frozen = True135* stores the fields, config, and if the class is settings in the mypy metadata for access by subclasses136FT)r/)�fields�137class_varsr�)r6r�r�collect_config�collect_fields_and_class_varsr�ri�BASESETTINGS_FULLNAME�add_initializer�add_model_construct_method�138set_frozenr8r/�adjust_decorator_signaturesr�r�get_values_dictr�r�)	rar��is_a_root_modelr�r;r<�field�is_settings�	class_vars	         rTr��"PydanticModelTransformer.transform�s,���y�y�~�~��'��-���$�$�&��!�?�?��X����>�Z�/���E��z�z�!����m�m�$9�:�����V�[�J��'�'���U�����	�	�&�-�-�4�2G��H��(�(�*�CI�I�&��z�z�5�?�?�#4�4�&�I�R\�]�R\�Y�>�>�9�+>�+>�+@�@�R\�]��,�,�.�'139��
�
�l�#���J��]s�$E�$Ec�d^�URRRR5H�n[	UR140[5(dM$UR141RSm[	T[5(dMT[	TR[5(dMuTRR[;dM�TRR[:Xa/[U4Sj[TR 555(aM�SUR142R"lM� g)a�When we decorate a function `f` with `pydantic.validator(...)`, `pydantic.field_validator`143or `pydantic.serializer(...)`, mypy sees `f` as a regular method taking a `self` instance,144even though pydantic internally wraps `f` with `classmethod` if necessary.145 146Teach mypy this by marking any function whose outermost decorator is a `validator()`,147`field_validator()` or `serializer()` call as a `classmethod`.148rc3�># �UHFupTRUS:H=(a& [U[5=(a URS:Hv� MH g7f)�mode�afterN)r�rgr%�value)�.0�ir�	first_decs   �rT�	<genexpr>�GPydanticModelTransformer.adjust_decorator_signatures.<locals>.<genexpr>sL���� �*C���&�/�/��2�f�<�r��C�QX�AY�r�^a�^g�^g�kr�^r�r�*C�s�AATN)r6r��names�valuesrgrhr�original_decoratorsr�calleer rl�(IMPLICIT_CLASSMETHOD_DECORATOR_FULLNAMES�MODEL_VALIDATOR_FULLNAME�any�	enumerater��func�is_class)rarmrQs  @rTrC�4PydanticModelTransformer.adjust_decorator_signaturess�����9�9�>�>�'�'�.�.�0�C��#�(�(�I�.�.��H�H�8�8��;�	��y�(�3�3�"�9�#3�#3�X�>�>�!�(�(�1�1�5]�]�"�(�(�1�1�5M�M�� �*3�I�N�N�*C� ���.2�C�H�H�M�M�*�#1rVc149���URn[5nSnSnURR5H2upVUR	XV5nU(dMSnURU5 M4 SnURRGHNn[U[[45(dM![U[5(Ga9URSn	[U	[5(aU	RS:waMm[UR[5(ac[!URR"URR$5H)up�U150cM151URUR	X�SS95 M+ GO8[UR[&5(aaURRHGup�[U[(5(dMURUR	UR*U
55 MI O�[U[5(a�URS:waGM�URRHun[U[5(dMURSn	[U	[5(dM@URUR	U	RUR55 Mw U(aUR,R/SU5  OSnGMQ U(dU(akU(adUR0(aSUR2(dBUR4(d1UR6R8(a[;UR,U5 UR<R>S	SH�n[@URB;aMUR,RE[GURH55 URB[@S152R5HunnURKUU5 M M� U$)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�)&r6�ModelConfigData�keywords�items�get_config_update�update�defs�bodyrgrr�lvaluesr r��rvaluerr�r�r�rr%rNr8�fail�has_alias_generatorr2r1r\r��error_required_dynamic_aliasesr��mror�r��add_plugin_dependencyr5rl�153setdefault)rar�r��has_config_kwargs�has_config_from_namespacer��expr�config_data�stmt�lhsr�r�key_expr�154value_expr�substmtr�rNs                 rTr=�'PydanticModelTransformer.collect_config's����i�i�� �"��!��$)�!��,�,�,�,�.�J�D��0�0��<�K��{�$(�!��
�
�k�*�	/�"&���H�H�M�M�D��d�^�X�$>�?�?���$��/�/��l�l�1�o��!�#�x�0�0�C�H�H��4N���d�k�k�8�4�4�),�T�[�[�-B�-B�D�K�K�DT�DT�)U�
��#�+�$��
�
�d�&<�&<�X�VZ�&<�&[�\�*V� ����X�6�6�04���0A�0A�,��)�(�G�<�<�$��
�
�d�&<�&<�X�^�^�Z�&X�Y�1B��155�D�(�+�+��9�9��(��#�y�y�~�~�G�%�g�~�>�>� �!�/�/�!�,�C�%�c�8�4�4� ��M�M�$�"8�"8����7�>�>�"R�S�
 .�!��	�	���o����(,�%�M"�P� 9���.�.��0�0�F�4K�4K��&�&�D�D�.�t�y�y�$�?��H�H�L�L���$�D��4�=�=�0��
�I�I�+�+�,A�$�-�-�,P�Q�#�}�}�\�:�8�D�J�J�L���e��!�!�$��.� M�
%��
rVc�:�URn0n0n[URRSS5GH�n[UR156;aMURR[UR55 UR157[SR5H�upx[RXhUR5n	U	RURUR5 X�U'URRRU5n158U159(dM}U160R (dM�[#U161R [$[&45(aM�URR)SU162R 5 M� UR163[SR5Hupx[*RU5XW'M GM� [-5n[-5nUR/UR05H�n
UR3X�U5nUcMU
R4Sn[#U[65(de[#U[5(aZU(a(UR8S:wa[;URU
5 M�UR=UR85 X�UR8'M�[#U[*5(dM�UR=UR85 X�UR8'M� [?URA55[?URA554$)zACollects the fields for the model, accounting for parent classes.rc�����r;z7BaseModel field may only be overridden by another fieldr<rr�)!r6�reversedr�rpr�r�r8rqr5rlrfr�rrrTr�rhrgr*r"rmr%�set�%_get_assignment_statements_from_blockri�$collect_field_or_class_var_from_stmtrkr r�� error_extra_fields_on_root_model�add�listrU)rar`rr��found_fields�found_class_varsr�r�rrF�sym_node�current_field_names�current_class_vars_namesrw�maybe_fieldrxs                rTr>�6PydanticModelTransformer.collect_fields_and_class_varsssY���i�i��79��=?���S�X�X�\�\�!�B�/�0�D��4�=�=�0��
�I�I�+�+�,A�$�-�-�,P�Q�"�m�m�L�9�(�C�I�I�K�164��*�6�6�t�4�9�9�M��165�1�1�#�(�(�D�I�I�F�%*�T�"��8�8�>�>�-�-�d�3���8��
�
�
�j����QT�Ve�Pf�6g�6g��I�I�N�N�Q� �
�
��L� #�m�m�L�9�,�G�M�M�O�166��)>�)J�)J�4�)P� �&�P�51�<),���-0�U� ��>�>�s�x�x�H�D��C�C�D�Xh�i�K��"���,�,�q�/�C��c�8�,�,�,�,��+�'9�:�:� �S�X�X��%7�4�T�Y�Y��E�'�+�+�C�H�H�5�-8����*��K�)>�?�?�(�,�,�S�X�X�6�-8����*�I�"�L�'�'�)�*�D�1A�1H�1H�1J�,K�K�KrVc#�,# �URH/nUR(aMURU5Shv�N M1 URb@URR(d$URUR5Shv�N gggNVN	7frZ)rj�is_unreachabler��	else_body)rarwrjs   rT�,_get_assignment_statements_from_if_statement�EPydanticModelTransformer._get_assignment_statements_from_if_statement�su����I�I�D��&�&�&��E�E�d�K�K�K���>�>�%�d�n�n�.K�.K��A�A�$�.�.�Q�Q�Q�/L�%�L�Q�s'�B�B�B�AB�B�	B�Bc#��# �URHNn[U[5(aUv� M[U[5(dM5UR	U5Shv�N MP gN	7frZ)rjrgrrr�)ra�blockrws   rTr��>PydanticModelTransformer._get_assignment_statements_from_block�sL����J�J�D��$��/�/��167��D�&�)�)��L�L�T�R�R�R�	�S�s�>A$�A$�A"�168A$c
�	�URnURSn[U[5(a5[R169"UR5(aURS:XagUR(d�[UR[5(a�[URR[5(af[URRR[5(a3URRRR[;agURU;ag[URU5 gURSn[U[5(dg[R170"UR5(aURS:XagURR R#UR5nUcgUR$n[U[&5(ag[U[(5(aURR+SU5 g[U[,5(dgUR.(a[1UR5$[3UR45n[U[65(a6UR4RS:XaURR+SU5 UR9U5n	UR;U5n171UR4c�UR<(a}UR>(alURRAURSS9nU(aX�lO:URR+S	U5 [C[DRF5UlUR<(aU	(a[1UR5$URIU5up�U
(aSURJ(dBURL(d1URNRP(a[SURU5 URUU5nURWXeRU5n[YURU
U	U172UUURZUR\UURS1739174$)a&Get pydantic model field from statement.175 176Args:177    stmt: The statement.178    model_config: Configuration settings for the model.179    class_vars: ClassVars already known to be defined on the model.180 181Returns:182    A pydantic model field if it could find the field in statement. Otherwise, `None`.183rr`NzFType aliases inside BaseModel definitions are not supported at runtimezdataclasses.InitVarz%InitVar is not supported in BaseModelT)�is_finalzGNeed type argument for Final[...] with non-literal default in BaseModel)184r�r�r�r�r�r�r�r�r�r�)/r6rkrgr rF�is_valid_field_namer��185new_syntaxrlrrWrl�DECORATOR_FULLNAMES�error_untyped_fieldsr8r�rTr�rhr"r(rmr*�is_classvarr%rBr�r;�get_has_default�186get_strictr��is_inferred�analyze_simple_literal_typer9r>�187from_error�get_alias_infor2r1r\r�ro�is_field_frozen�_infer_dataclass_attr_init_typer�r�r�)rarwr`r<r�rxrmrh�	node_typer�r�rr�r�r��	init_types                rTr��=PydanticModelTransformer.collect_field_or_class_var_from_stmt�s?���i�i���l�l�1�o���#�x�(�(��0K�0K�C�H�H�0U�0U�Y\�Ya�Ya�es�Ys������4�;�;��1�1��t�{�{�1�1�8�<�<��t�{�{�1�1�8�8�(�C�C��K�K�&�&�-�-�6�6�:M�M�188��x�x�:�%��
!����D�1���l�l�1�o���#�x�(�(���*�*�3�8�8�4�4����N�8R���h�h�n�n� � ����*���;���x�x���d�O�,�,�189��d�I�&�&��I�I�N�N�X��
���$��$�$�190����(����2�2�$�D�I�I�.�	��i��*�*�y�~�~�/F�/F�J_�/_��I�I�N�N�7��
�191�*�*�4�0������&���8�8���
�
�$�2B�2B��)�)�7�7����d�7�S�C���	��	�	���]���$�I�$8�$8�9��	��=�=�[�(����2�2�#'�#6�#6�t�#<� ���!�2�2�l�6S�6S��"�"�@�@�*�4�9�9�d�;��(�(��.�	��8�8��h�h��M�	�!����/�#��������;�;�����192�	193rVc��URnUR(aU$[UR5n[U[5(dU$URRS5nU(GaP[UR[5(a�URRS5nU(deUR(a+[[URURU55nO[[R5$[U[5(a8UR[[[/:Xa[!UR"SU5$UR$R'SURR(S3U5 U$UR$R'SURR(S3U5 U$)zfInfer __init__ argument type for an attribute.194 195In particular, possibly use the signature of __set__.196�__set__rPz(Unsupported signature for "__set__" in "�"zUnsupported "__set__" in ")r��implicitrBrgr;r�rhr�get_containing_type_infor8r9r>�unannotatedr:�	arg_kindsrr197�	arg_typesr8rmr�)	rarmr�r��default�t�setter�198super_info�setter_types	         rTr��8PydanticModelTransformer._infer_dataclass_attr_init_typeNsP��199�(�(���<�<��N��C�H�H�%���!�X�&�&��N������I�&����&�+�+�w�/�/��V�V�<�<�Y�G�200�!�!�z��;�;�"1�2I�&�+�+�WX�W]�W]�_i�2j�"k�K�"�9�#8�#8�9�9��k�<�8�8�[�=R�=R����W�>�2013�;�3H�3H��3K�Q�O�O��I�I�N�N�%M�a�f�f�k�k�]�Z[�#\�^e�f����	�	���!;�A�F�F�K�K�=��J�G�T��rVc�&�SURRR;a3URRRSR(dgURR202n[
UR5nUR=(d UR(+=(a URSLn[
UR=(a UR(+5nURUUUUUUUSS9n	U(Ga�URR[5R n203[#U204[$5(deSU205R;Ga8U206RSR n[#U[&5(deUGbUR(b�UR(n[#U[*5(de[-UR.5H�up�Ub,UR1S5(dUR1S5(dM6URR3UR4U
5nUb.US;a(UR7[9[:R<55n[?X�5nU	RA[CUUS[D55 M� URGX5(dC[?S	5nU	RA[CU[I[:RJ5S[L55 [OURURSU	[Q5S2079 g)z�Adds a fields-aware `__init__` method to the class.208 209The added `__init__` will be annotated with types vs. all `Any` depending on the plugin settings.210r`NFT)r�r��requires_dynamic_aliasesr�rGrr��__�_)�_cli_settings_source�_build_sources�kwargs)r��return_type))r6r�rT�plugin_generatedr\r�r�r�r2r1r3rn�get_field_argumentsr8rfr?rhrgr)rr�r:r[r��211startswith�	anal_typer��accept�ChangeExplicitTypeOfAnyr>�from_omitted_genericsr*�appendrr
�should_init_forbid_extrar9r�r�212add_methodr<)rar;r�rGrr�r�r�r�r��base_settings_node�base_settings_init_node�	func_type�arg_idxr��analyzed_variable_typer��vars                  rTr@�(PydanticModelTransformer.add_initializerts���������-�-�-�d�i�i�n�n�6J�6J�:�6V�6g�6g���"�"�-�-���F�M�M�*���0�0�K�F�4K�4K�L�v�QW�Qi�Qi�qv�Qv�	�#'��(B�(B�(b�6�Kb�Kb�Gb�#c� ��'�'���%�%=��#�'�%)�(�	213���!%���!A�!A�BW�!X�!]�!]���0�(�;�;�;�;��/�5�5�5�*<�*B�*B�:�*N�*S�*S�'�!�"9�7�C�C�C�C�*�6�;R�;W�;W�;c� 7� <� <�I�%�i��>�>�>�>�-6�y�7J�7J�-K�)��#�+�x�/B�/B�4�/H�/H�PX�Pc�Pc�dg�Ph�Ph�$�15���1D�1D�Y�EX�EX�Y`�Ea�1b�.�1�=�(�O�C�6L�5R�5R� 7�	�8W�8W� X�6�2�$'�x�#H�����H�X�7M�t�U\�$]�^�.L�"�,�,�V�<�<��h�-�C��K�K���g�i�.@�.@�&A�4��S�T��4�9�9�d�i�i��$�H�J�WrVc�0�URR[S3URR[S35/5n[U[	5/5n[[
SU5US[5n[R"URRR5 URUS[UR5SSUUS9nSSS5 URX5(dC[
S5n	WR![U	[#[$R&5S[(55 U(aWU/-OU/W-n[+URUR,S	U[/UR,R05SS2149 g!,(df   N�=f)z�Adds a fully typed `model_construct` classmethod to the class.215 216Similar to the fields-aware __init__ method, but always uses the field names (not aliases),217and does not treat settings fields as optional.218z.setz.str�_fields_setNTF)r�r�r�r�rGrr��model_construct)r�r��is_classmethod)r8�219named_type�
BUILTINS_NAMErAr<rr*r
r6rrbrr�r�r�r�r�r9r>r�rr�r6rCr�)220rar;r�rGr�set_str�optional_set_str�fields_set_argumentr�r�s221          rTrA�3PydanticModelTransformer.add_model_construct_method�sU���)�)�&�&�-���'=��	�	�@T�@T�Xe�Wf�fj�Uk�@l�?m�n��$�g�x�z�%:�;��&�s�=�:J�'K�M]�_c�el�m��
�
&�
&�t�y�y�'8�'8�'H�'H�
I��+�+���!�&�-�-�0�).��'�+�,��D�J��,�,�V�<�<��h�-�C��K�K���g�i�.@�.@�&A�4��S�T�/<�t�*�+�+�CV�BW�Z^�B^����I�I��I�I���%�d�i�i�n�n�5��
	222�!J�
I�s�*)F�223Fc�x�URRnUGHnURRUR5nUb�UR224n[
U[5(aU=(d URUl	Mi[
U[5(a9URR(dURR5 M�M�M�URXBSS9nXGlX7l	URS-UR-Ul[#[$U5URUR'GM  g)z�Marks all fields as properties so that attempts to set them trigger mypy errors.225 226This is the same approach used by the attrs and dataclasses plugins.227NF)r��.)r6r�rTr�r�rhrgr*r��is_propertyr"r8�final_iteration�deferr�rl�	_fullnamer&r)rar;r�r/r�rFr�r�s        rTrB�#PydanticModelTransformer.set_frozen�s���228�y�y�~�~���E��z�z�~�~�e�j�j�1�H��#��m�m���c�3�'�'�&,�&?����C�O���_�5�5�d�i�i�>W�>W��I�I�O�O�%�?X�5��l�l�4��l�>����"(�� $�
�
�� 3�c�h�h� >��
�'6�t�S�'A��229�230�3�8�8�$�#rVc�*�XR;agUS:Xaq[U[5(aURS:HnOC[U[5(aUR231S:HnOU(d[
XRU5 g[US9$US:Xa2Sn[U[5(aURS:XaSn[US	9$[U[5(a)URS232;a[S0XRS:H0D6$[
XRU5 g)
z�Determines the config update due to a single kwarg in the ConfigDict definition.233 234Warns if a tracked config attribute is set to a value the plugin doesn't know how to interpret (e.g., an int)235Nr.�forbid)�forbid_extrar0T�
builtins.NoneF)rn)�
builtins.True�builtins.Falser�r�)r4rgr%rNrr��error_invalid_config_valuer8rdr rl)rar�rrar�rns      rTrg�*PydanticModelTransformer.get_config_update�s���236�1�1�1���7�?��#�w�'�'�"�y�y�H�4���C��,�,�"�x�x�8�3�� �/�t�Y�Y��D��"��=�=��$�$�"&���#�x�(�(�S�\�\�_�-L�&+�#�"�7J�K�K��c�8�$�$����9\�)\�"�M�d�L�L�O�,K�%L�M�M�"�4���C�8�rVc��URn[U[5(ag[U[5(a�[UR[2375(a�URR[:Xaz[URUR5HUup#UbUS:XaUR[Ls $US:XdM*[U[5=(a URS:H(+s $ g[U[5(+$)zUReturns a boolean indicating whether the field defined in `stmt` is a required field.Fr��default_factoryr�)rlrgr'rrWr#rl�FIELD_FULLNAMEr�r�r�rcrr �rwrurr�s    rTr��(PydanticModelTransformer.get_has_defaults����{�{���d�H�%�%���d�H�%�%�*�T�[�[�'�*J�*J�t�{�{�Oc�Oc�gu�Ou�238!����D�N�N�;�	���<�4�9�#4��=�=��<�<��,�,� *�3�� 9� ]�c�l�l�o�>]�^�^�<���d�L�1�1�1rVc��URn[U[5(a�[UR[5(a�URR239[:Xaj[URUR5HFup#US:waM
[U[5(a$UR240S:Xa gUR241S:Xa g g g)zEReturns a the `strict` value of a field if defined, otherwise `None`.r�r�Tr�FN)rlrgrrWr#rlr�r�r�r�r r�s    rTr��#PydanticModelTransformer.get_strict's����{�{���d�H�%�%�*�T�[�[�'�*J�*J�t�{�{�Oc�Oc�gu�Ou� ����D�N�N�;�	���8�#���c�8�,�,��|�|��6�#����)9�9�$��<�rVc��URn[U[5(ag[U[5(a=[UR[2425(aURR[:XdgSUR;a)URURRS5nO:SUR;a)URURRS5nOg[U[5(aURS4$g)z�Returns a pair (alias, has_dynamic_alias), extracted from the declaration of the field defined in `stmt`.243 244`has_dynamic_alias` is True if and only if an alias is provided, but not as a string literal.245If `has_dynamic_alias` is True, `alias` will be None.246)NF�validation_aliasr�F)NT)
rlrgr'rrWr#rlr�r�r��indexr%rN)rwrurs   rTr��'PydanticModelTransformer.get_alias_info7s����{�{���d�H�%�%��
�t�X�&�&�:�d�k�k�7�+K�+K�PT�P[�P[�Pd�Pd�hv�Pv������/��)�)�D�N�N�0�0�1C�D�E�C�
����
&��)�)�D�N�N�0�0��9�:�C���c�7�#�#��9�9�e�#�#�rVc��URn[U[5(ag[U[5(a=[UR[2475(aURR[:Xdg[UR5HBup#US:XdM
URUn[U[5=(a URS:Hs $ g)aLReturns whether the field is frozen, extracted from the declaration of the field defined in `stmt`.248 249Note that this is only whether the field was declared to be frozen in a `<field_name> = Field(frozen=True)`250sense; this does not determine whether the field is frozen because the entire model is frozen; that is251handled separately.252Fr/r�)rlrgr'rrWr#rlr�r[r�r�r )rwrurPr�rs     rTr��(PydanticModelTransformer.is_field_frozenUs����{�{���d�H�%�%��
�t�X�&�&�:�d�k�k�7�+K�+K�PT�P[�P[�Pd�Pd�hv�Pv��$�T�^�^�4�K�A��8�#��i�i��l��!�#�x�0�T�S�\�\�_�5T�T�5�rVc	��URRn	UV253s/sH\n254U(aU255R(aMU256RU	UUU=(d UUURUU=(a U257R258S:HS9PM^ nn259U$s sn260f)z�Helper function used during the construction of the `__init__` and `model_construct` method signatures.261 262Returns a list of mypy Argument instances for use in the generated signatures.263r�)r�r�r�r�r�r�r�)r6r�r�r�r8r�)rar;r�r�r�r�rGrr�r�rF�	argumentss            rTr��,PydanticModelTransformer.get_field_argumentsns����y�y�~�~�� �
264� ���%�"9�"9�	
�E�����)�7�F�;�#��I�I�)A�#0�#I�U�Z�Z�6�5I�
�	
� �	�
265����
266s�B�ABc���UR(d<UR(d+URU[UR55(agUR267(agURR$)a(Indicates whether the generated `__init__` should get a `**kwargs` at the end of its signature.268 269We disallow arbitrary kwargs if the extra config setting is "forbid", or if the plugin config says to,270*unless* a required dynamic alias is present (since then we can't determine a valid signature).271FT)r2r1�is_dynamic_alias_presentr�rnr�r\r�)rar;r�s   rTr��1PydanticModelTransformer.should_init_forbid_extra�sT���'�'�6�+B�+B��,�,�V�T�&�:T�:T�5U�V�V�������!�!�3�3�3rVc�z�UHnUR(dM g U(aUHnURbM g g)z�Returns whether any fields on the model have a "dynamic alias", i.e., an alias that cannot be272determined during static analysis.273TF)r�r�)r;rnrFs   rTr��1PydanticModelTransformer.is_dynamic_alias_present�s>��274�E��&�&�&�������;�;�&�� �rV)r8r6r7r\N)275r�rr�zExpression | Statementr�r2r\r[r�r�)r�r�)r�r�)r�rd)r`rdrr�r�zJtuple[list[PydanticModelField] | None, list[PydanticModelClassVar] | None])rwrr��Iterator[AssignmentStmt])r�rr�r�)rwrr`rdr<z dict[str, PydanticModelClassVar]r�z1PydanticModelField | PydanticModelClassVar | None)rmr&r�r�r�rr�r )276r;�list[PydanticModelField]r�rdrGr�rr�r�r�)r;r�r�r2r/r�r�r�r!)r�r�rrrar�r��ModelConfigData | None)rwrr�r�)rwrr�r)rwrr�ztuple[str | None, bool])r;r�r�r�r�r�r�r�r�r�rGr�rr�r�r�r��list[Argument])r;r�r�rdr�r�)r;r�rnr�r�r�)r�r�r�r�r�r4r�r`r�rCr=r>r�r�r�r�r@rArBrg�staticmethodr�r�r�r�r�r�r�r�r�rVrTr�r��s���	'��8�	�+�
�+�'�+�-�	+�277,�+�278�
+�"�H2�6J�XBL�+�BL�<@�BL�	S�BL�HR�S�G279�"�G280�2A�G281�Oo�G282�	:�G283�R$�L7X�.�7X�8G�7X�VZ�7X�ko�7X�	
�7X�r&284�(�&285� �&286��	&287�288�&289�290�
&291�PB�2!�F�2��2�*�
��
�����:����B*/��(�����	�292��#'�
�����#'��293��@4����rVr�c�:^�\rSrSrSrSU4SjjrSSjrSrU=r$)r�i�z<A type translator used to change type of Any's, if explicit.c�.>�Xl[TU]	5 grZ)�_type_of_anyr_r`)ra�type_of_anyrcs  �rTr`� ChangeExplicitTypeOfAny.__init__�s���'��
���rVc�t�UR[R:XaURURS9$U$)N)r)rr>r�r�r)rar�s  rT�	visit_any�!ChangeExplicitTypeOfAny.visit_any�s0���=�=�I�.�.�.��?�?�t�/@�/@�?�A�A��HrV)r)rrr�r�)r�r9r�r=)	r�r�r�r�r�r`rr�r�r�s@rTr�r��s���F���rVr�c�r�\rSrSrSrS	S294SjjrSSjrSSjrS
SjrSr	g)rdi�z(Pydantic mypy plugin model config class.Nc	�d�XlX lX0lX@lXPlX`lXplX�lgrZ)r�r/r�r1r3r2rnr�)	rar�r/r�r1r3r2rnr�s	         rTr`�ModelConfigData.__init__�s2��)����.�� 0��!2�� 0��#6� ��rVc�v�URR5VVs0sHupUcM295X_M snn$s snnf)zvReturns a dict of Pydantic model config names to their values.296 297It includes the config if config value is not `None`.298)�__dict__rf)ra�k�vs   rTrD�ModelConfigData.get_values_dict�s3��299"&���!4�!4�!6�H�!6���!����!6�H�H��Hs�	5�5c�r�UcgUR5R5Hup#[XU5 M g)z$Update Pydantic model config values.N)rDrfr�)rar�rrs    rTrh�ModelConfigData.update�s2���>���*�*�,�2�2�4�D�A��D�Q��5rVc�6�[X5c
[XU5 gg)zFSet default value for Pydantic model config if config value is `None`.N)r�r�)rar�rNs   rTrr�ModelConfigData.setdefault�s���4��%��D�u�%�&rV)r�r�r/rnr1r�r3r2)NNNNNNNN)r�rr/rr�rr1rr3rr2rrnrr�rr�)r�r�r�r�)r�r�rNrr�r�)300r�r�r�r�r�r`rDrhrrr�r�rVrTrdrd�s���2�%)�"�'+�(,�)-�(,�+/�"��!����%�	�301&��'�
�&��)����(I� �&rVrdc�,�UR[5$)zXReturn whether the type info is a root model subclass (or the `RootModel` class itself).)ri�ROOT_MODEL_FULLNAME)r�s rTrr�s���=�=�,�-�-rVzpydantic-ormzInvalid from_attributes call�Pydanticzpydantic-configzInvalid config valuezpydantic-aliaszDynamic alias disallowedzpydantic-unexpectedzUnexpected behaviorzpydantic-fieldzUntyped field disallowedzInvalid Field defaultsz!Extra field on RootModel subclassc�6�URSUS3U[S9 g)zCEmits an error when the model does not have `from_attributes=True`.r�z$" does not have from_attributes=True��codeN)rm�	ERROR_ORM)�302model_namer�r�s   rTr�r��s���H�H�q���@�
A�7�QZ�H�[rVc�6�URSUS3U[S9 g)z0Emits an error when the config value is invalid.zInvalid value for "Config.r�rN)rm�ERROR_CONFIG)r�r�r�s   rTr�r��s���H�H�)�$��q�
1�7��H�NrVc�.�URSU[S9 g)zfEmits required dynamic aliases error.303 304This will be called when `warn_required_dynamic_aliases=True`.305z#Required dynamic aliases disallowedrN)rm�ERROR_ALIAS�r�r�s  rTroro�s��306�H�H�
2�G�+�H�NrVc�N�SnSUS3nUSUS3-
nURXB[S9 g)z Emits unexpected behavior error.z6https://github.com/pydantic/pydantic/issues/new/choosez7The pydantic mypy plugin ran into unexpected behavior: �307z&Please consider reporting this bug at z so we can try to fix it!rN)rm�ERROR_UNEXPECTED)r�r�r��link�full_messages     rTr�r�s?��308D�D�L�V�H�TV�W�L��<�T�F�B[�\�\�L��H�H�\�)9�H�:rVc�.�URSU[S9 g)z;Emits an error when there is an untyped field in the model.zUntyped fields disallowedrN)rm�
ERROR_UNTYPEDr!s  rTr�r�s���H�H�
(�'�
�H�FrVc�.�URSU[S9 g)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`rN)rm�ERROR_EXTRA_FIELD_ROOT_MODELr!s  rTr�r�s���H�H�
A�7�Qm�H�nrVc	��URnX(R;anURUn	U	R(aN[U	R[3095(a/URRRU	R5 [U[5(aURS5n310OURS/5n311U(a;U=(d [[U55n[[S5US[ S5/nO0U=(d [U5n[[S5US[ 5/nX�-n///p�nUHvnUR"(dS5eUR%UR"5 U
R%UR&R(5 UR%UR*5 Mx [-X�X�X�(aU/OSS9n[X#[/[15/55nUUl[3UU5UlUUlUR8S-U-UlUR<UlX(R;a1[?X(R5nURUURU'U(auSUl [UUR45nUUlUR:UlSUl![EU[GS	5/U5nUR<Ul[I[JU5n	O[I[JU5n	SU	lX�RU'URLRRR%U5 g)312zhVery closely related to `mypy.plugins.common.add_method_to_class`, with a few pydantic-specific changes.zbuiltins.functionr6NT�__pydantic_self__z"All arguments must be fully typed.)�	variablesr�r#)'r�rTr�rgrhrrirj�remover2r��named_generic_typer?rCrr*rr�r�r�r�r�r:rr!r4r�r]rlr�r�rD�is_decoratedr�rr r&r�defn)r�r�r�r�r�r��tvar_defr�r�rm�
function_type�firstr�r�r�r�	signaturer\�r_namer�decs                     rTr�r�s����8�8�D��z�z���j�j�������J�s�x�x��$A�$A��H�H�M�M� � ����*��#�6�7�7����':�;�
��.�.�/B�B�G�
���>��-��*=�!>�	��#�f�+�y�$���F�G���4��t�!4�	��#�1�2�I�t�W�M�N���<�D�&(�"�b�)�I����"�"�H�$H�H�"�����,�,�-�������*�*�+�������"�	���i�m�]e�PX�z�ko��I��4�u�h�j�\�2�3�D��D�I�!�)�T�2�D�I�"�D�M��]�]�S�(�4�/�D�N��	�	�D�I��z�z��-�d�J�J�?��!�Z�Z��-��313�314�6��315� �����d�i�i� ������n�n��������x�
�6�7��;���9�9����d�C�(���d�D�)���C���J�J�t���I�I�N�N�����t�$rVc�$�URS5(dg[RS:�aSSKnOSSKn[US5nURU5sSSS5 $![316a SSKnURSSS9 gf=f!,(df   g=f)	z}Returns a dict of config keys to values.317 318It reads configs from toml file and returns `None` if the file is not a toml file.319z.tomlN)��rzJNo TOML parser installed, cannot read configuration from `pyproject.toml`.rP)�320stacklevel�rb)321rw�sys�version_info�tomllib�tomli�ImportError�warnings�warn�open�load)r��toml_rB�rfs    rTr�r�ps���322����(�(��323���7�"��	�!�324�k�4�	 �B��z�z�"�~�325!�	 ��
�	���M�M�f�st�M�u��		��326!�	 �s�A�B�A>�=A>�327B)rSr�r�ztype[Plugin])r�r/r�r=)r�r)r�r�)rr�r�r,r�rr�r�)r�r�r�r2r�rr�r�)r�r2r�rr�r�)r�r�r�z8CheckerPluginInterface | SemanticAnalyzerPluginInterfacer�rr�r�)r�r,r�rr�r�)NNF)r�z8SemanticAnalyzerPluginInterface | CheckerPluginInterfacer�rr�r�r�r�r�r=r�r r2zTypeVarType | Noner�r�r�r�)r�r�r�zdict[str, Any] | None)�r��328__future__rr=�collections.abcr�configparserr�typingrr�mypy.errorcodesr�mypy.expandtyper	r329�330mypy.nodesrrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*�mypy.optionsr+�mypy.pluginr,r-r.r/r0r1r2�mypy.plugins.commonr3�mypy.semanalr4�mypy.server.triggerr5�331mypy.stater6�mypy.type_visitorr7�mypy.typeopsr8�332mypy.typesr9r:r;r<r=r>r?r@rArB�
mypy.typevarsrC�	mypy.utilrD�mypy.versionrE�mypy_version�pydantic._internalrF�pydantic.versionrGr�r�rjr|r?rrqr��DATACLASS_FULLNAMErYr�rX�MYPY_VERSION_TUPLEr�rUrRr[rxr�r%r�r�rdrrrr r$r(�ERROR_FIELD_DEFAULTSr*r�r�ror�r�r�r�r�r�rVrT�<module>ras���d�"�333�$�%� �%�@�!�!�!�!�!�!�!�!�!�D!�����+�5��,�0����(�2�4�&�/� ��'��.��4��=��5��R��(��5��K����,?�Bt�Au�+u�(�(��5���
����TM�V�TM�n+C�+C�\#�4PT�PT�f334�335�2^�^�B�n��(&�(&�V.�336
�n�&D�j�Q�	��*�,B�J�O���(�*D�j�Q���2�4I�:�V���*�,F�337�S�
� �!1�3K�Z�X��(�)9�;^�`j�k��\�338O�339O�;��;�N�;�Y`�;�	�;�G�340o�"�#'� �U%�	A�U%�	�U%��U%��	U%�341�U%��
U%�!�U%��U%�342�U%�prV
codekingpro/portable-devtools · Team Ai