+
    7*i"  c                  sZ   ^ 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 ^ RIHtHtHt ^RIHtHt ^RIHt ]'       d   ^RIHt ^RIHt ^R	IHt ]! R
]]]]3,          R7      t]! R4      t ! R R]]]3,          4      t ! R R]	],          4      t R R lt!RR R llt"RR R llt#R# )i    )annotations)IteratorMapping)TYPE_CHECKINGAnyCallableGenericLiteralTypeVarUnion)
CoreSchemaSchemaSerializerSchemaValidator)PydanticErrorCodesPydanticUserError)PluggableSchemaValidator)PydanticDataclass)	BaseModel)TypeAdapterValSer)ZboundTc                  sn    ] tR t^tRtRtRR/R 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tR# )MockCoreSchemazMocker for `pydantic_core.CoreSchema` which optionally attempts to
rebuild the thing it's mocking when one of its methods is accessed and raises an error if that fails.
attempt_rebuildNc               s(    V ^8  d   QhRRRRRRRR/# )	   error_messagestrcoder   r   z&Callable[[], CoreSchema | None] | NonereturnNone Zformat   "E/usr/lib/python3.14/site-packages/pydantic/_internal/_mock_val_ser.py__annotate__MockCoreSchema.__annotate__   s3     
3 
3
3 !	
3
 @
3 

3    c               	s8    Wn         W n        W0n        R V n        R # N_error_message_code_attempt_rebuild_built_memo)selfr   r   r   s   &&$$r    __init__ZMockCoreSchema.__init__   s     ,)-
 /.2r#   c                    V ^8  d   QhRRRR/# )r   keyr   r   r   r   r   r   r    r!   r"   (   s     2 2s 2s 2r#   c                	s@    V P                  4       P                  V4      # r$   )
_get_built__getitem__)r*   r-   s   &&r    r/   ZMockCoreSchema.__getitem__(   s     ,,S11r#   c                   V ^8  d   QhRR/# )r   r   Zintr   r   r   r    r!   r"   +   s     + + +r#   c                	>    V P                  4       P                  4       # r$   )r.   __len__r*      &r    r2   ZMockCoreSchema.__len__+   s     ((**r#   c               r0   )r   r   zIterator[str]r   r   r   r    r!   r"   .   s     , ,- ,r#   c                	r1   r$   )r.   __iter__r3   r4   r    r5   ZMockCoreSchema.__iter__.   s     ))++r#   c               r0   )r   r   r
   r   r   r   r    r!   r"   1   s     	F 	FJ 	Fr#   c                	s    V P                   e   V P                   # V P                  '       d   V P                  4       pVe	   Wn         V# \        V P                  V P                  R7      hNr   r)   r(   r   r&   r'   r*   Zschema   & r    r.   ZMockCoreSchema._get_built1   s\    '###   **,F!#)  3 3$**EEr#   c               r0   )r   r   zCoreSchema | Noner   r   r   r    r!   r"   <   s      * r#   c                	s    R V n         V P                  '       d8   V P                  4       pVe   V# \        V P                  V P                  R7      hR # r6   r8   r9   r:   r    rebuildZMockCoreSchema.rebuild<   sI       **,F!'(;(;$**MMr#   )r(   r)   r'   r&   r%   )__name__
__module____qualname____firstlineno____doc__	__slots__r+   r/   r2   r5   r.   r;   __static_attributes__r   r#   r    r   r      s?     MI
3
 CG
32+,	F r#   r   c                  sJ    ] tR t^GtRtRtRR/R R lltR R ltR R	 ltR
t	R# )
MockValSerzMocker for `pydantic_core.SchemaValidator` or `pydantic_core.SchemaSerializer` which optionally attempts to
rebuild the thing it's mocking when one of its methods is accessed and raises an error if that fails.
r   Nc          
     s,    V ^8  d   QhRRRRRRRRR	R
/# )r   r   r   r   r   
val_or_serz"Literal['validator', 'serializer']r   z"Callable[[], ValSer | None] | Noner   r   r   r   r   r    r!   MockValSer.__annotate__N   s<     0 00 !	0
 70 <0 
0r#   c               	sZ    Wn         VR 8X  d   \        M\        V n        W n        W@n        R# )	validatorN)r&   r   r   _val_or_serr'   r(   )r*   r   r   rD   r   s   &&$$$r    r+   ZMockValSer.__init__N   s'     ,.8K.G?M])-
 /r#   c               r,   )r   itemr   r   r   r   r   r   r    r!   rE   [   s     	F 	F 	F 	Fr#   c                	s    R pV P                   '       d    V P                  4       pVe   \        W14      # \        V P                  V4       \        V P                  V P
                  R7      h)Tr7   )r(   ZgetattrrG   r   r&   r'   )r*   rH   Z__tracebackhide__val_sers   &&  r    __getattr__ZMockValSer.__getattr__[   s\        ++-G"w-- 	  $' 3 3$**EEr#   c               r0   )r   r   zValSer | Noner   r   r   r    r!   rE   f   s       r#   c                	s    V P                   '       d8   V P                  4       pVe   V# \        V P                  V P                  R7      hR # r6   )r(   r   r&   r'   )r*   rI   r:   r    r;   ZMockValSer.rebuildf   sA       ++-G"'(;(;$**MMr#   )r(   r'   r&   rG   )r&   r'   rG   r(   )
r<   r=   r>   r?   r@   rA   r+   rJ   r;   rB   r   r#   r    rC   rC   G   s/     MI0 ?C0	F r#   rC   c               r,   )r   adapterr   r   r   r   r   r   r    r!   r!   p   s     $ $K $D $r#   c                s   a  \        S P                  4      pRV RV R2pR V 3R llp\        VRV! R 4      R7      S n        \	        VRR	V! R
 4      R7      S n        \	        VRRV! R 4      R7      S n        R# )zSet `core_schema`, `validator` and `serializer` to mock core types on a type adapter instance.

Args:
    adapter: The type adapter instance to set the mocks on
z`TypeAdapter[z,]` is not fully defined; you should define `zC` and all referenced types, then call `.rebuild()` on the instance.c               r,   )r   attr_fnzCallable[[TypeAdapter], T]r   Callable[[], T | None]r   r   r   r    r!   Z,set_type_adapter_mocks.<locals>.__annotate__|   s      $> CY r#   c                s   <a  R  VV 3R llpV# )c               r0   r   r   zT | Noner   r   r   r    r!   ZHset_type_adapter_mocks.<locals>.attempt_rebuild_fn.<locals>.__annotate__}        	 	 	r#   c                 sF   < S P                  R ^R7      R Jd	   S! S 4      # R# F)Zraise_errorsZ_parent_namespace_depthN)r;   )rK   rL      r    handlerZCset_type_adapter_mocks.<locals>.attempt_rebuild_fn.<locals>.handler}   s'    E1MUZZw''r#   r   )rL   rR   rK      f r    attempt_rebuild_fnZ2set_type_adapter_mocks.<locals>.attempt_rebuild_fn|       	 	
 r#   class-not-fully-definedc                    V P                   # r$   )core_schemaZtar4   r    <lambda>(set_type_adapter_mocks.<locals>.<lambda>   s    bnnr#   r   r   rF   c                rW   r$   )rF   rY   r4   r    rZ   r[      s    bllr#   r   rD   r   
serializerc                rW   r$   )r^   rY   r4   r    rZ   r[      s    bmmr#   N)r   Z_typer   rX   rC   rF   r^   )rK   Z	type_reprundefined_type_error_messagerT   s   f   r    set_type_adapter_mocksr`   p   s     GMM"I
	{"Nyk Z3 	4 !
  )$&*+DEG
 #$&*+BC	G $$&*+CD	Gr#   c               $    V ^8  d   QhRRRRRR/# )r   clsztype[BaseModel]undefined_namer   r   r   r   r   r   r    r!   r!      s"     $ $ $# $[_ $r#   c                s   a  RS P                    RV RS P                    R2pR V 3R llp\        VRV! R 4      R	7      S n        \        VRR
V! R 4      R7      S n        \        VRRV! R 4      R7      S n        R# )zSet `__pydantic_core_schema__`, `__pydantic_validator__` and `__pydantic_serializer__` to mock core types on a model.

Args:
    cls: The model class to set the mocks on
    undefined_name: Name of the undefined thing, used in error messages
`*` is not fully defined; you should define z, then call `z.model_rebuild()`.c               r,   )r   rL   zCallable[[type[BaseModel]], T]r   rM   r   r   r   r    r!   Z%set_model_mocks.<locals>.__annotate__   s      $B G] r#   c                s   <a  R  V V3R llpV# )c               r0   rN   r   r   r   r    r!   ZAset_model_mocks.<locals>.attempt_rebuild_fn.<locals>.__annotate__   rO   r#   c                 sF   < SP                  R ^R7      R Jd	   S ! S4      # R# rP   )Zmodel_rebuild)rL   rb   rQ   r    rR   Z<set_model_mocks.<locals>.attempt_rebuild_fn.<locals>.handler   s)      eQ OW\\s|#r#   r   )rL   rR   rb   rS   r    rT   Z+set_model_mocks.<locals>.attempt_rebuild_fn   rU   r#   rV   c                rW   r$   __pydantic_core_schema__Zcr4   r    rZ   !set_model_mocks.<locals>.<lambda>   
    Q5O5Or#   r\   rF   c                rW   r$   __pydantic_validator__rh   r4   r    rZ   ri      
    Q5M5Mr#   r]   r^   c                rW   r$   __pydantic_serializer__rh   r4   r    rZ   ri      
    Q5N5Nr#   N)r<   r   rg   rC   rl   ro   )rb   rc   r_   rT   s   f&  r    set_model_mocksrq      s     CLL>CNCS T||n$6	8 !
  $2$&*+OP$C 
 ",$&*+MN	"C #-$&*+NO	#Cr#   c               ra   )r   rb   ztype[PydanticDataclass]rc   r   r   r   r   r   r   r    r!   r!      s#     & &4 &c &gk &r#   c                s
  a a ^RI Ho RS P                   RV RS P                   R2pR V V3R llp\        VRV! R	 4      R
7      S n        \        VRRV! R 4      R7      S n        \        VRRV! R 4      R7      S n        R# )zSet `__pydantic_validator__` and `__pydantic_serializer__` to `MockValSer`s on a dataclass.

Args:
    cls: The model class to set the mocks on
    undefined_name: Name of the undefined thing, used in error messages
)rebuild_dataclassrd   re   z4, then call `pydantic.dataclasses.rebuild_dataclass(z)`.c               r,   )r   rL   z&Callable[[type[PydanticDataclass]], T]r   rM   r   r   r   r    r!   Z)set_dataclass_mocks.<locals>.__annotate__   s      $J Oe r#   c                s    <a  R  V VV3R llpV# )c               r0   rN   r   r   r   r    r!   ZEset_dataclass_mocks.<locals>.attempt_rebuild_fn.<locals>.__annotate__   rO   r#   c                 s6   < S! SR ^R7      R Jd	   S ! S4      # R# rP   r   )rL   rb   rr   s   r    rR   Z@set_dataclass_mocks.<locals>.attempt_rebuild_fn.<locals>.handler   s#     5RST\aas|#r#   r   )rL   rR   rb   rr   s   f r    rT   Z/set_dataclass_mocks.<locals>.attempt_rebuild_fn   s    	 	
 r#   rV   c                rW   r$   rf   rh   r4   r    rZ   %set_dataclass_mocks.<locals>.<lambda>   rj   r#   r\   rF   c                rW   r$   rk   rh   r4   r    rZ   rs      rm   r#   r]   r^   c                rW   r$   rn   rh   r4   r    rZ   rs      rp   r#   N)dataclassesrr   r<   r   rg   rC   rl   ro   )rb   rc   r_   rT   rr   s   f&  @r    set_dataclass_mocksru      s     0 CLL>CNCS T>>All^3	P !
  $2$&*+OP$C 
 ",$&*+MN	"C #-$&*+NO	#Cr#   N)zall referenced types)$Z
__future__r    Zcollections.abcr   r   Ztypingr   r   r   r   r   r   r	   Zpydantic_corer
   r   r   Zerrorsr   r   Zplugin._schema_validatorr   rt   r   Zmainr   Ztype_adapterr   r   r   r   r   rC   r`   rq   ru   r   r#   r    <module>rv      s    " - Q Q Q G G : ?/ * 
8PRb'b!c	dCL/WS#X& /d& &R$N$N& &r#   