U nf @sdZddlmZddlZddlmZddlmZmZm Z ddl m Z ddl m Z mZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/dd l0m1Z1dd l2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9dd l:m;Z;dd lm?Z?ddl@mAZAddlBmCZCddlDmEZEddlFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQddlRmSZSddlTmUZUddlVmWZXddlYmZZZddl[m\Z\zddlFm]Z]Wn"e^k rddlFmOZ]YnXdZ_dZ`dZadZbdZcdZddZed Zfd!Zgd"d!d#d$d%d&hZhe\eXZieid'krBd(nd)Zjd*ZWd+d,d-d.d/ZkGd0d1d1e7ZlGd2d3d3Zmd4d5d6d7d8ZnGd9d:d:ZoGd;d<d<ZpGd=d>d>ZqGd?d@d@Zre dAdBdCZse dDdEdCZte dFdGdCZue dHdIdCZve dJdKdCZwe dJdLdCZxe dJdMdCZyd+dNdOdPdQdRdSZzd+dTdOdPdUdVdWZ{dTdOdPdXdYdZZ|d+d[dOdPd\d]d^Z}dTdOdPdXd_d`Z~dNdOdPdXdadbZdNdOdPdXdcddZdsdfdgd+dhd5didjdkdPdl dmdnZd+dodpdqdrZdS)tz^This module includes classes and functions designed specifically for use with the mypy plugin.) annotationsN) ConfigParser)AnyCallableIterator) ErrorCode) expand_typeexpand_type_by_instance) ARG_NAMED ARG_NAMED_OPTARG_OPTARG_POS ARG_STAR2 INVARIANTMDEFArgumentAssignmentStmtBlockCallExprClassDefContext DecoratorDictExpr EllipsisExpr ExpressionFuncDefIfStmtJsonDict MemberExprNameExprPassStmtPlaceholderNodeRefExpr StatementStrExprSymbolTableNodeTempNode TypeAliasTypeInfoVar)Options)CheckerPluginInterfaceClassDefContextFunctionContext MethodContextPluginReportConfigContextSemanticAnalyzerPluginInterface) dataclasses)deserialize_and_fixup_type)set_callable_name)make_wildcard_trigger)state)map_type_from_supertype) AnyType CallableTypeInstanceNoneType OverloadedType TypeOfAnyTypeType TypeVarType UnionTypeget_proper_type) fill_typevars)get_unique_redefinition_name) __version__)_fields)parse_mypy_version) TypeVarDef)r@ pydantic-mypyzpydantic-mypy-metadatazpydantic.main.BaseModelz#pydantic_settings.main.BaseSettingszpydantic.root_model.RootModelz5pydantic._internal._model_construction.ModelMetaclasszpydantic.fields.Fieldzpydantic.dataclasses.dataclassz.pydantic.functional_validators.model_validatorz.pydantic.functional_validators.field_validatorz*pydantic.functional_serializers.serializerz0pydantic.functional_serializers.model_serializerz.pydantic.deprecated.class_validators.validatorz3pydantic.deprecated.class_validators.root_validator)ribuiltins __builtins__strz type[Plugin])versionreturncCstS)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)rNrQ;/opt/hc_python/lib/python3.8/site-packages/pydantic/mypy.pypluginss rScseZdZdZdddfdd Zddd d d Zdd d d dZddd ddZddd ddZdd d ddZ dddddZ dddddZ dddd d!Z d"d#dd$d%Z ZS)&rPzThe Pydantic mypy plugin.r*NoneoptionsrOcs&t||_|j|_t|dSN)PydanticPluginConfig plugin_configto_data _plugin_datasuper__init__)selfrV __class__rQrRr]s  zPydanticPlugin.__init__rMz(Callable[[ClassDefContext], bool] | None)fullnamerOcCs:||}|r6t|jtr6tdd|jjDr6|jSdS)zUpdate Pydantic model class.css|]}|jtkVqdSrW)raBASEMODEL_FULLNAME.0baserQrQrR sz5PydanticPlugin.get_base_class_hook..N)lookup_fully_qualified isinstancenoder(anymro$_pydantic_model_class_maker_callbackr^rasymrQrQrRget_base_class_hooks  z"PydanticPlugin.get_base_class_hookz(Callable[[ClassDefContext], None] | NonecCs|tkr|jSdS)z,Update Pydantic `ModelMetaclass` definition.N)MODEL_METACLASS_FULLNAME)_pydantic_model_metaclass_marker_callbackr^rarQrQrRget_metaclass_hooksz!PydanticPlugin.get_metaclass_hookz(Callable[[FunctionContext], Type] | NonecCs"||}|r|jtkr|jSdS)z/Adjust the return type of the `Field` function.N)rgraFIELD_FULLNAME_pydantic_field_callbackrmrQrQrRget_function_hooks z PydanticPlugin.get_function_hookz&Callable[[MethodContext], Type] | NonecCs|drtSdS)z-Adjust return type of `from_orm` method call.z .from_ormN)endswithfrom_attributes_callbackrrrQrQrRget_method_hooks zPydanticPlugin.get_method_hookcCs|tkrtdkrtjSdS)zMark pydantic.dataclasses as dataclass. Mypy version 1.1.1 added support for `@dataclass_transform` decorator. )rzN)DATACLASS_FULLNAMEMYPY_VERSION_TUPLEr2Zdataclass_class_maker_callbackrrrQrQrRget_class_decorator_hooksz'PydanticPlugin.get_class_decorator_hookr0dict[str, Any]ctxrOcCs|jS)zjReturn all plugin config data. Used by mypy to determine if cache needs to be discarded. )r[)r^rrQrQrRreport_config_datasz!PydanticPlugin.report_config_datar,boolcCst|j|j|j|j}|SrW)PydanticModelTransformerclsreasonapirY transform)r^rZ transformerrQrQrRrlsz3PydanticPlugin._pydantic_model_class_maker_callbackcCs<|jjr dS|jjj}|s"tdt|jddr8d|j_dS)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) rYdebug_dataclass_transformrinfoZdeclared_metaclassAssertionErrorgetattrtyper)r^rZinfo_metaclassrQrQrRrqs   z8PydanticPlugin._pydantic_model_metaclass_marker_callbackr-r=c s|j|jddkstd|jddks2td|jd}|jd}|r`|r`t|j|jS|r|jdd}|d}t|t s|Snt|r|jdd}t|t r|j d}t|t r|j }t|dd}|rtd d |Drtfd d |D|_|SS) aoExtract the type of the `default` argument from the Field function, and use it as the return type. In particular: * Check whether the default and default_factory argument is specified. * Output an error if both are specified. * Retrieve the type of the argument which is specified, and use it as return type for the function. rdefaultz0"default" is no longer first argument in Field()rzdefault_factoryz9"default_factory" is no longer second argument in Field()argsNcss|]}t|tVqdSrW)rhr@)rdargrQrQrRrfsz:PydanticPlugin._pydantic_field_callback..c3s|] }VqdSrWrQ)rd_Zdefault_any_typerQrRrfs)default_return_typeZcallee_arg_namesrr+error_default_and_default_factory_specifiedrcontext arg_typesrhrr<itemsr9ret_typeralltuple) r^rZ default_argsZdefault_factory_argsZ default_typeZ default_argZdefault_factory_typerrrQrrRrus2       z'PydanticPlugin._pydantic_field_callback)__name__ __module__ __qualname____doc__r]rorsrvryr}rrlrqru __classcell__rQrQr_rRrPs   rPc@sTeZdZUdZdZded<ded<ded<ded<dd d d d Zd dddZdS)rXaA 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_typedwarn_required_dynamic_aliasesrrrrrrr*rTrUcCs|jdkrdSt|j}|dk rr|didi}|jD]4}||d}t|tsbtd|t|||q:n:t}| |j|jD] }|j t |dd}t|||qdS)NZtoolrIFz/Configuration value must be a boolean for key: )fallback) config_file parse_tomlget __slots__rhr ValueErrorsetattrrread getbooleanCONFIGFILE_KEY)r^rVZ toml_configconfigkeyZsettingrYrQrQrRr]s       zPydanticPluginConfig.__init__r~rOcsfddjDS)z/Returns a dict of config names to their values.csi|]}|t|qSrQ)r)rdrr^rQrR #sz0PydanticPluginConfig.to_data..)rrrQrrRrZ!szPydanticPluginConfig.to_dataN)rrrrr__annotations__r]rZrQrQrQrRrXs  rXr.r=rcCs|j}t|tr|j}t|tr4t|jtr4|j}nexplicitrrr r ) r^rrrrrrrrrQrQrR to_argumentTs zPydanticModelField.to_argumentF)rrrrOc Cs|r&t|jtr&|j}t|_||_|jdk rt|jdddk rt |j j Lt |}|rz|j D]}t|trdt|_qdt|j|jjj|iW5QRSQRX|jS)zABased on mypy.plugins.dataclasses.DataclassAttribute.expand_type.N self_type)rhrr@Z copy_modifiedrZvariancerrr6strict_optional_setrVstrict_optionalrCrrrid)r^rrrZ modified_typeZfilled_with_typevarsrrQrQrRrgs    (zPydanticModelField.expand_typer))rrrrrOcCs0|r|jdk r|j}n|j}t|||||S)z.NFcss|]}|jtkVqdSrW)raBASESETTINGS_FULLNAMErcrQrQrRrfsT)rcSsi|]}|j|qSrQrrrdfieldrQrQrRrsz6PydanticModelTransformer.transform..cSsi|]}|j|qSrQr)rdZ class_varrQrQrRrs)fields class_varsr)rrrjrkcollect_configcollect_fields_and_class_varsradd_initializeradd_model_construct_method set_frozenrradjust_decorator_signaturesget_values_dictrr)r^r is_root_modelrrrr is_settingsrQrQrRrs(     z"PydanticModelTransformer.transformcs|jjjD]t\}}t|jtr|jjdttrtj t rj j t krj j t krxtfddtjDsd|jj_qdS)aWhen 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`. rc3s4|],\}}j|dko*t|to*|jdkVqdS)modeafterN) arg_namesrhr$value)rdirZ first_decrQrRrfszGPydanticModelTransformer.adjust_decorator_signatures..TN)rrnamesrrhrirZoriginal_decoratorsrcalleerraDECORATOR_FULLNAMESMODEL_VALIDATOR_FULLNAMErj enumeraterfuncis_class)r^rrnrQrrRr s       z4PydanticModelTransformer.adjust_decorator_signaturesModelConfigDatac CsL|j}t}d}d}|jD]&\}}|||}|rd}||qd}|jjD]V}t|t t fshqRt|t r"|j d} t| t rR| j dkrqRt|jtrt|jj|jjD](\} } | dkrq||j| | ddqnBt|jtr|jjD]*\} } t| ts q||| j| qnjt|t r|j dkrPydanticModelTransformer._get_assignment_statements_from_blockrz dict[str, PydanticModelClassVar]z1PydanticModelField | PydanticModelClassVar | None)rr rrOc Cs,|j}|jd}t|tr0t|jr0|jdkr4dS|jst|jt rxt|jj t rxt|jj j trx|jj j j t krxdS|j|krdSt |j|dS|jd}t|tsdSt|jr|jdkrdS|jj|j}|dkrdS|j}t|trdSt|tr|jd|dSt|ts&dS|jr8t|jSt|j}t|trj|jj dkrj|jd|||} |jdkr|jr|jr|jj|jdd} | r| |_n|jd |t t!j"|_|#|\} } | r|j$s|j%j&rt'|j||(||j|} t)|j| | | |j*|j+| |jd S) a^Get pydantic model field from statement. Args: stmt: The statement. model_config: Configuration settings for the model. class_vars: ClassVars already known to be defined on the model. Returns: A pydantic model field if it could find the field in statement. Otherwise, `None`. rr 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)rrrrrrrr),rrrhrrFZis_valid_field_namerZ new_syntaxrrrrarerror_untyped_fieldsrrrrrir!r'rr)Z is_classvarrrBrr:get_has_defaultr(Z is_inferredZanalyze_simple_literal_typer8r>Z from_errorget_alias_inforrYrr_infer_dataclass_attr_init_typerrr)r^rr rrrrnriZ node_typerrrrZ init_typerQrQrRr s                  z=PydanticModelTransformer.collect_field_or_class_var_from_stmtr%rMrr)rnrrrOc Cs|j}|jr|St|j}t|ts(|S|jd}|rt|jtr|jd}|sXt |jrttt |j|j|}n t t j St|tr|jtttgkrt|jd|S|jd|jjd|n|jd|jjd||S)zvInfer __init__ argument type for an attribute. In particular, possibly use the signature of __set__. __set__rLz(Unsupported signature for "__set__" in ""zUnsupported "__set__" in ")rZimplicitrBrhr:rrirZget_containing_type_inforr7r8r>Z unannotatedr9 arg_kindsr r rrrr) r^rnrrrtsetterZ super_infoZ setter_typerQrQrRr,=s.      z8PydanticModelTransformer._infer_dataclass_attr_init_typezlist[PydanticModelField])rrrrrOcCsrd|jjjkr"|jjjdjs"dS|jj}|jdk }t|joB|j }|j |||||dd}|rt dkr|dj t krzt nt|d_ |r&|jtj} d| jkr&| jdj} | dk r&| jdk r&| j} t| jD]N\} } | ds| dsq|j| j| }t| |}|t||dtq|||sVtd }|t|ttjdt t!|j|jd|t"d dS) 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. r]NT)rrequires_dynamic_aliasesrrr)rzrrzr__rkwargs)r return_type)#rrrplugin_generatedrYrrrrget_field_argumentsr|rr r r rrgrrirrr startswithZ anal_typerr)appendrshould_init_forbid_extrar8r>rr add_methodr;)r^rrrrrrr2rZbase_settings_nodeZbase_settings_init_nodeZ func_typeZarg_idxrZanalyzed_variable_typervarrQrQrRrcs>     z(PydanticModelTransformer.add_initializer)rrrrOc Cs|jtd|jtdg}t|tg}ttd||dt}t |jj j |j |ddd|d}W5QRX| ||std}|t|ttjdt|g|}t|j|jd |t|jjdd dS) 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.strZ _fields_setNTF)rr2rrr4Zmodel_construct)rr5is_classmethod)r named_type BUILTINS_NAMErAr;rr)r r6rrVrr7r:r9r8r>rrr;rrCr) r^rrrZset_strZoptional_set_strZfields_set_argumentrr<rQrQrRrs.$   z3PydanticModelTransformer.add_model_construct_method)rrrrOc Cs|jj}|D]}|j|j}|dk r|j}t|tr>||_qt|t r\|j j s\|j qz t |}Wntk rt|}YnXd|d|jd} t| |j |jq |j||dd}||_||_|jd|j|_tt||j|j<q dS)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. Nzsym_node.node: rrF)r.)rrrrrrirhr)Z is_propertyr!rZfinal_iterationZdeferrM TypeErrorreprr`rrra _fullnamer%r) r^rrrrrr%r<Zvar_strrrQrQrRrs(   z#PydanticModelTransformer.set_frozenFrModelConfigData | None)rrr rOcCs||jkrdS|dkrbt|tr,|jdk}n,t|trB|jdk}n|sTt||j|dSt|dS|dkrd}t|t r|j dkrd}t|d St|t r|j d krtf||j d kiSt||j|dS) 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) NrZforbid) forbid_extrarT builtins.NoneF)r) builtins.Truezbuiltins.FalserG) rrhr$rrrerror_invalid_config_valuerrrra)r^rrr rErrQrQrRr s(        z*PydanticModelTransformer.get_config_updatecCs|j}t|trdSt|trt|jtr|jjtkrt|j |j D]H\}}|dks\|dkrj|j t k S|dkrDt|t o|jdk SqDdSt|t  S)zUReturns a boolean indicating whether the field defined in `stmt` is a required field.FNrrrF)rrhr&rrr"rartrrrr`rr)rrrrrQrQrRr*s "z(PydanticModelTransformer.get_has_defaultztuple[str | None, bool]cCs|j}t|trdSt|tr6t|jtr6|jjtks:dSt|j D]:\}}|dkrVqD|j |}t|t rx|j dfSdSqDdS)aReturns 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. )NFrF)NT) rrhr&rrr"rartrrrr$r)rrrrrrQrQrRr+s$     z'PydanticModelTransformer.get_alias_infolist[Argument])rrrr2rrrOcs*jjfdd|D}|S)zHelper function used during the construction of the `__init__` and `model_construct` method signatures. Returns a list of mypy Argument instances for use in the generated signatures. c s2g|]*}r|js|jp jdqS))rrrrr)rrrrrrrr2r^rrrQrR 1s z@PydanticModelTransformer.get_field_arguments..)rr)r^rrrr2rr argumentsrQrJrRr7#s   z,PydanticModelTransformer.get_field_arguments)rrrOcCs.|js||t|jrdS|jr&dS|jjS)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)ris_dynamic_alias_presentrrrErYr)r^rrrQrQrRr:?s z1PydanticModelTransformer.should_init_forbid_extra)rrrOcCs8|D]}|jrdSq|r4|D]}|jdkrdSqdS)zReturns whether any fields on the model have a "dynamic alias", i.e., an alias that cannot be determined during static analysis. TNF)rr)rrrrQrQrRrMLs z1PydanticModelTransformer.is_dynamic_alias_presentN)F)F)rrrrrrr]rrrrr&rr r,rrrr  staticmethodr*r+r7r:rMrQrQrQrRrs:   %LA}&.#" rc@sXeZdZdZdddddddddZddd d Zd d d ddZddd dddZdS)rz(Pydantic mypy plugin model config class.Nz bool | NonerErrrrcCs"||_||_||_||_||_dSrWrO)r^rErrrrrQrQrRr]^s zModelConfigData.__init__r~rcCsdd|jDS)zReturns a dict of Pydantic model config names to their values. It includes the config if config value is not `None`. cSsi|]\}}|dk r||qSrWrQ)rdkvrQrQrRrqsz3ModelConfigData.get_values_dict..)__dict__rrrQrQrRrlszModelConfigData.get_values_dictrDrT)rrOcCs2|dkr dS|D]\}}t|||qdS)z$Update Pydantic model config values.N)rrr)r^rrPrQrQrQrRr sszModelConfigData.updaterMr)rrrOcCst||dkrt|||dS)zFSet default value for Pydantic model config if config value is `None`.N)rr)r^rrrQrQrRrzszModelConfigData.setdefault)NNNNN)rrrrr]rr rrQrQrQrRr[srz pydantic-ormzInvalid from_attributes callZPydanticzpydantic-configzInvalid config valuezpydantic-aliaszDynamic alias disallowedzpydantic-unexpectedzUnexpected behaviorzpydantic-fieldzUntyped field disallowedzInvalid Field defaultsz!Extra field on RootModel subclassr+rrT) model_namerrrOcCs|jd|d|tddS)zCEmits an error when the model does not have `from_attributes=True`.r.z$" does not have from_attributes=TruecodeN)r ERROR_ORM)rSrrrQrQrRrsrr1)rrrrOcCs|jd|d|tddS)z0Emits an error when the config value is invalid.zInvalid value for "Config.r.rTN)r ERROR_CONFIG)rrrrQrQrRrHsrH)rrrOcCs|jd|tddS)znEmits required dynamic aliases error. This will be called when `warn_required_dynamic_aliases=True`. z#Required dynamic aliases disallowedrTN)r ERROR_ALIASrrrQrQrRrsrz8CheckerPluginInterface | SemanticAnalyzerPluginInterface)rrrrOcCs4d}d|d}|d|d7}|j||tddS)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!rTN)rERROR_UNEXPECTED)rrrlinkZ full_messagerQrQrRrs rcCs|jd|tddS)z;Emits an error when there is an untyped field in the model.zUntyped fields disallowedrTN)r ERROR_UNTYPEDrYrQrQrRr)sr)cCs|jd|tddS)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`rTN)rERROR_EXTRA_FIELD_ROOT_MODELrYrQrQrRr!sr!cCs|jd|tddS)zNEmits an error when `Field` has both `default` and `default_factory` together.z>Field default and default_factory cannot be specified togetherrTN)rERROR_FIELD_DEFAULTSrYrQrQrRrsrFz8SemanticAnalyzerPluginInterface | CheckerPluginInterfacerrIrzTypeVarDef | Noner) rrrrr5rtvar_defr=rOcCs |j}||jkr<|j|} | jrZnamed_generic_typer?rCrr)r rrr9rrrr9 variablesrr r4rrrarCrrDZ is_decoratedr=rrr%rZdefn)rrrrr5rr`r=rrnZ function_typefirstrrr/r signaturerZr_namerQdecrQrQrRr;sZ               r;zdict[str, Any] | None)rrOc Cs|dsdStjdkr"ddl}n6z ddl}Wn(tk rVddl}|dYdSXt|d}| |W5QRSQRXdS)zReturns a dict of config keys to values. It reads configs from toml file and returns `None` if the file is not a toml file. z.tomlN) rzJNo TOML parser installed, cannot read configuration from `pyproject.toml`.rb) rwsys version_infotomllibtomli ImportErrorwarningswarnopenload)rZtoml_rnrfrQrQrRr s      r)NNF)r __future__rri configparserrtypingrrrZmypy.errorcodesrZmypy.expandtyperr Z mypy.nodesr r r r rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)Z mypy.optionsr*Z mypy.pluginr+r,r-r.r/r0r1Z mypy.pluginsr2Zmypy.plugins.commonr3Z mypy.semanalr4Zmypy.server.triggerr5Z mypy.stater6Z mypy.typeopsr7Z mypy.typesr8r9r:r;r<r=r>r?r@rArBZ mypy.typevarsrCZ mypy.utilrDZ mypy.versionrEZ mypy_versionZpydantic._internalrFZpydantic.versionrGrHrmrrrbrrrprtr{rrr|r?rSrPrXrxrrrrrVrWrXr[r]r_r^rrHrrr)r!rr;rrQrQrQrRs   " $      4      v.s%          X