+
    LV-jX  ã                  ó8  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
HtHtHt ^ RIHtHtHtHt ^ RIHtHtHtHt ^RIHt R)t]P6                  R*8¼  g   ]P6                  R+8  d   R R ltMR R ltR R ltRRRR/R R llt]R,,          tR] R&    ]!! ]! ]4      4      t"R] R&    ! R R	]4      t# ! R R
]$4      t% ! R R]4      t&]&PN                  t' ]]&PN                  ,          t(R] R &     ! R! R]4      t)RR"/R# R$ llt*R% R& lt+RR/R' R( llt,R# )-zEHigh-level introspection utilities, used to inspect type annotations.)ÚannotationsN)Ú	Generator)ÚInitVar)ÚEnumÚIntEnumÚauto)ÚAnyÚLiteralÚ
NamedTupleÚcast)Ú	TypeAliasÚassert_neverÚget_argsÚ
get_origin)Útyping_objectsÚAnnotationSourceÚForbiddenQualifierÚInspectedAnnotationÚ	Qualifierc               ó    € V ^8„  d   QhRRRR/# ©é   Úobjr   ÚreturnÚbool© )Úformats   "Úp/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/typing_inspection/introspection.pyÚ__annotate__r      s   € ÷ ,ñ ,˜Sð ,¨ñ ,ó    c               ó.   € \         P                  ! V 4      # ©a8  Return whether the provided origin is the union form.

```pycon
>>> is_union_origin(typing.Union)
True
>>> is_union_origin(get_origin(int | str))
True
>>> is_union_origin(types.UnionType)
True
```

!!! note
    Since Python 3.14, both `Union[<t1>, <t2>, ...]` and `<t1> | <t2> | ...` forms create instances
    of the same [`typing.Union`][] class. As such, it is recommended to not use this function
    anymore (provided that you only support Python 3.14 or greater), and instead use the
    [`typing_objects.is_union()`][typing_inspection.typing_objects.is_union] function directly:

    ```python
    from typing import Union, get_origin

    from typing_inspection import typing_objects

    typ = int | str  # Or Union[int, str]
    origin = get_origin(typ)
    if typing_objects.is_union(origin):
        ...
    ```
)r   Úis_union©r   s   "r   Úis_union_originr$      s   € ô: ×&Ò& sÓ+Ð+r   c               ó    € V ^8„  d   QhRRRR/# r   r   )r   s   "r   r   r   >   s   € ÷ Fñ F˜Sð F¨ñ Fr   c               ób   € \         P                  ! V 4      ;'       g    V \        P                  J # r!   )r   r"   ÚtypesÚ	UnionTyper#   s   "r   r$   r$   >   s&   € ô: ×&Ò& sÓ+×EÐE¨s´e·o±oÐ/EÐEr   c               ó    € V ^8„  d   QhRRRR/# )r   Úvaluer   r   ÚNoner   )r   s   "r   r   r   ^   s   € ÷ oñ o˜sð o¨$ñ or   c          	     óÂ   € \        V \        \        \        \        \
        \        P                  34      '       g%   V \        P                  Jd   \        V  R24      hR# R# )zCType check the provided literal value against the legal parameters.zK is not a valid literal value, must be one of: int, bytes, str, Enum, None.N)	Ú
isinstanceÚintÚbytesÚstrr   r   r   ÚNoneTypeÚ	TypeError)r*   s   "r   Ú_literal_type_checkr3   ^   sP   € ô �uœs¤E¬3´´d¼N×<SÑ<SÐT×UÒUØœ×0Ñ0Ó0ä˜5˜'Ð!lÐmÓnÐnñ 1ñ Vr   Ú
type_checkFÚunpack_type_aliasesÚeagerc               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   Ú
annotationr   r4   r   r5   ú#Literal['skip', 'lenient', 'eager']r   zGenerator[Any]r   )r   s   "r   r   r   g   s8   € ÷ m+ñ m+Øðm+ð ð	m+ð
 =ðm+ð ñm+r   c            #  óŒ  "  € VR8X  dW   RpV P                    FB  pV'       d   \        V4       Ve   V\        P                  J d   V'       g   Rx € RpK>  Vx € KD  	  R# . pV P                    F¹  p\        P                  ! V4      '       d5    VP
                  p\        WaVR7      pVP                  R V 4       4       KS  V'       d   \        V4       V\        P                  J d$   VP                  R\        P                  34       K�  VP                  V\        V4      34       K»  	   \        P                  V4      pR V 4        Rj  x€L
  R#   \         d=    TR8X  d   h T'       d   \        T4       TP                  T\        T4      34        EK,  i ; i LP  \         d    R	 T 4        Rj  x€L 
   R# i ; i5i)
a�  Yield the values contained in the provided [`Literal`][typing.Literal] [special form][].

Args:
    annotation: The [`Literal`][typing.Literal] [special form][] to unpack.
    type_check: Whether to check if the literal values are [legal parameters][literal-legal-parameters].
        Raises a [`TypeError`][] otherwise.
    unpack_type_aliases: What to do when encountering [PEP 695](https://peps.python.org/pep-0695/)
        [type aliases][type-aliases]. Can be one of:

        - `'skip'`: Do not try to parse type aliases. Note that this can lead to incorrect results:
          ```pycon
          >>> type MyAlias = Literal[1, 2]
          >>> list(get_literal_values(Literal[MyAlias, 3], unpack_type_aliases="skip"))
          [MyAlias, 3]
          ```

        - `'lenient'`: Try to parse type aliases, and fallback to `'skip'` if the type alias can't be inspected
          (because of an undefined forward reference).

        - `'eager'`: Parse type aliases and raise any encountered [`NameError`][] exceptions (the default):
          ```pycon
          >>> type MyAlias = Literal[1, 2]
          >>> list(get_literal_values(Literal[MyAlias, 3], unpack_type_aliases="eager"))
          [1, 2, 3]
          ```

Note:
    While `None` is [equivalent to][none] `type(None)`, the runtime implementation of [`Literal`][typing.Literal]
    does not de-duplicate them. This function makes sure this de-duplication is applied:

    ```pycon
    >>> list(get_literal_values(Literal[NoneType, None]))
    [None]
    ```

Example:
    ```pycon
    >>> type Ints = Literal[1, 2]
    >>> list(get_literal_values(Literal[1, Ints], unpack_type_alias="skip"))
    ["a", Ints]
    >>> list(get_literal_values(Literal[1, Ints]))
    [1, 2]
    >>> list(get_literal_values(Literal[1.0], type_check=True))
    Traceback (most recent call last):
    ...
    TypeError: 1.0 is not a valid literal value, must be one of: int, bytes, str, Enum, None.
    ```
ÚskipFNT)r4   r5   c              3  ó:   "  € T F  q\        V4      3x € K  	  R # 5i©N)Útype)Ú.0Úas   & r   Ú	<genexpr>Ú%get_literal_values.<locals>.<genexpr>Å   s   é € Ð*JÁ¸A¬t°A«w­<Ãùs   ‚r6   c              3  ó*   "  € T F	  w  rVx € K  	  R # 5ir=   r   ©r?   ÚpÚ_s   &  r   rA   rB   Ô   s   é € Ð*¡c™d˜a�£cùó   ‚c              3  ó*   "  € T F	  w  rVx € K  	  R # 5ir=   r   rD   s   &  r   rA   rB   Ò   s   é € Ð6¡o™d˜a�£oùrG   )Ú__args__r3   r   r1   Úis_typealiastypeÚ	__value__Úget_literal_valuesÚextendÚ	NameErrorÚappendr>   ÚdictÚfromkeysr2   )	r8   r4   r5   Ú	_has_noneÚargÚvalues_and_typeÚalias_valueÚsub_argsÚdcts	   "$$      r   rL   rL   g   s‡  é € ðt ˜fÔ$Øˆ	ð ×&Ô&ˆCßÜ# CÔ(ØŠ{˜c¤^×%<Ñ%<Ó<ß Ø’JØ ’	à”	ó 'ð 8:ˆà×&Ô&ˆCô
 ×.Ò.¨s×3Ò3ðKØ"%§-¡-�Kô  2Ø#ÐPcô �Hð $×*Ñ*Ñ*JÁÓ*JÖJçÜ'¨Ô,Øœ.×1Ñ1Ó1Ø#×*Ñ*¨D´.×2IÑ2IÐ+JÖKà#×*Ñ*¨C´°c³Ð+;Ö<ñ5 'ð8	+Ü—-‘- Ó0ˆCñ
 +¡cÓ*×*Ò*øô5 !ô =Ø*¨gÔ5Øç!Ü+¨CÔ0Ø#×*Ñ*¨C´°c³Ð+;×<Ð<ð=úñ4 +øô	 ô 	7á6¡oÓ6×6Ô6ð	7üsy   ‚AGÁ?GÂEÂ.GÃ	A"GÄ,F  ÅGÅFÅGÅFÅ/'FÆGÆFÆGÆ GÆ7F:Æ8GÆ=GÇ GÇGr   úset[Qualifier]Ú_all_qualifiersc                  ó°   € ] tR t^ßtRt]! 4       t ]! 4       t ]! 4       t ]! 4       t	 ]! 4       t
 ]! 4       t ]! 4       t ]! 4       t ]R R l4       tRtR# )r   z”The source of an annotation, e.g. a class or a function.

Depending on the source, different [type qualifiers][type qualifier] may be (dis)allowed.
c               ó   € V ^8„  d   QhRR/# )r   r   rX   r   )r   s   "r   r   ÚAnnotationSource.__annotate__=  s   € ÷ ñ  Nñ r   c                óŠ  € V \         P                  J d   R0# V \         P                  J d   RR0# V \         P                  J d   0 Rm# V \         P                  J d   0 Rm# V \         P
                  \         P                  \         P                  39   d   \        4       # V \         P                  J d   \        # \        V 4       R# )zIThe allowed [type qualifiers][type qualifier] for this annotation source.ÚfinalÚ	class_varN>   r^   Úinit_varr_   >   ÚrequiredÚ	read_onlyÚnot_required)r   ÚASSIGNMENT_OR_VARIABLEÚCLASSÚ	DATACLASSÚ
TYPED_DICTÚNAMED_TUPLEÚFUNCTIONÚBAREÚsetÚANYrY   r   ©Úselfs   &r   Úallowed_qualifiersÚ#AnnotationSource.allowed_qualifiers<  s§   € ð Ô#×:Ñ:Ó:Ø�9ÐØÔ%×+Ñ+Ó+Ø˜[Ð)Ð)ØÔ%×/Ñ/Ó/Ú5Ð5ØÔ%×0Ñ0Ó0Ú<Ð<ØÔ&×2Ñ2Ô4D×4MÑ4MÔO_×OdÑOdÐeÔeÜ“5ˆLØÔ%×)Ñ)Ó)Ü"Ð"ä˜Ör   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   rd   re   rf   rg   rh   ri   rl   rj   Úpropertyro   Ú__static_attributes__r   r   r   r   r   ß   sŒ   † ññ
 "›VÐðñ ‹F€Eð	ñ “€Ið
ñ “€Jð
ñ “&€Kð	ñ ‹v€Hðñ ‹&€Cðñ
 ‹6€Dðð
 ôó ôr   c                  ó4   € ] tR tRt$ RtR]R&    R R ltRtR# )	r   iP  z-The provided [type qualifier][] is forbidden.r   Ú	qualifierc               ó    € V ^8„  d   QhRRRR/# )r   ry   r   r   r+   r   )r   s   "r   r   ÚForbiddenQualifier.__annotate__V  s   € ÷ #ñ # )ð #°4ñ #r   c               	ó   € Wn         R # r=   ©ry   )rn   ry   s   ""r   Ú__init__ÚForbiddenQualifier.__init__V  s   € Ø"Žr   r}   N)rq   rr   rs   rt   ru   Ú__annotations__r~   rw   r   r   r   r   r   P  s   ‡ Ù7àÓØ"÷#ñ #r   c                  ó<   € ] tR tRt]! 4       tR R ltR R ltRtR# )Ú_UnknownTypeEnumiZ  c               ó   € V ^8„  d   QhRR/# ©r   r   r0   r   )r   s   "r   r   Ú_UnknownTypeEnum.__annotate__]  s   € ÷ ñ ˜ñ r   c                	ó   € R # )ÚUNKNOWNr   rm   s   &r   Ú__str__Ú_UnknownTypeEnum.__str__]  s   € Ùr   c               ó   € V ^8„  d   QhRR/# r„   r   )r   s   "r   r   r…   `  s   € ÷ ñ ˜#ñ r   c                	ó   € R # )z	<UNKNOWN>r   rm   s   &r   Ú__repr__Ú_UnknownTypeEnum.__repr__`  s   € Ùr   r   N)	rq   rr   rs   rt   r   r‡   rˆ   rŒ   rw   r   r   r   r‚   r‚   Z  s   † Ù‹f€Gõ÷ñ r   r‚   Ú_UnkownTypec                  ó>   € ] tR tRt$ RtR]R&    R]R&    R]R&   R	tR
# )r   ik  z'The result of the inspected annotation.zAny | _UnkownTyper>   rX   Ú
qualifiersz	list[Any]Úmetadatar   N)rq   rr   rs   rt   ru   r€   rw   r   r   r   r   r   k  s$   ‡ Ù1à
Óðð ÓØJàÓÛ!r   r;   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r8   r   Úannotation_sourcer   r5   r9   r   r   r   )r   s   "r   r   r   ƒ  s>   € ÷ yAñ yAØðyAð (ð	yAð
 =ðyAð ñyAr   c              ó(  € VP                   p\        4       p. p \        WR7      w  rV'       d   We,           pK!  \        V 4      pVEe©   \        P
                  ! V4      '       d9   RV9  d   \        R4      hVP                  R4       V P                  ^ ,          p K…  \        P                  ! V4      '       d9   RV9  d   \        R4      hVP                  R4       V P                  ^ ,          p KÙ  \        P                  ! V4      '       d:   RV9  d   \        R4      hVP                  R4       V P                  ^ ,          p EK.  \        P                  ! V4      '       d:   RV9  d   \        R4      hVP                  R4       V P                  ^ ,          p EKƒ  \        P                  ! V4      '       d:   RV9  d   \        R4      hVP                  R4       V P                  ^ ,          p EKØ  MW\        V \        4      '       dA   RV9  d   \        R4      hVP                  R4       \        \         V P"                  4      p EK/   \        P                  ! V 4      '       d+   RV9  d   \        R4      hVP                  R4       \$        p My\        P
                  ! V 4      '       d+   RV9  d   \        R4      hVP                  R4       \$        p M3V \        J d*   RV9  d   \        R4      hVP                  R4       \$        p \'        WV4      # )ay	  Inspect an [annotation expression][], extracting any [type qualifier][] and metadata.

An [annotation expression][] is a [type expression][] optionally surrounded by one or more
[type qualifiers][type qualifier] or by [`Annotated`][typing.Annotated]. This function will:

- Unwrap the type expression, keeping track of the type qualifiers.
- Unwrap [`Annotated`][typing.Annotated] forms, keeping track of the annotated metadata.

Args:
    annotation: The annotation expression to be inspected.
    annotation_source: The source of the annotation. Depending on the source (e.g. a class), different type
        qualifiers may be (dis)allowed. To allow any type qualifier, use
        [`AnnotationSource.ANY`][typing_inspection.introspection.AnnotationSource.ANY].
    unpack_type_aliases: What to do when encountering [PEP 695](https://peps.python.org/pep-0695/)
        [type aliases][type-aliases]. Can be one of:

        - `'skip'`: Do not try to parse type aliases (the default):
          ```pycon
          >>> type MyInt = Annotated[int, 'meta']
          >>> inspect_annotation(MyInt, annotation_source=AnnotationSource.BARE, unpack_type_aliases='skip')
          InspectedAnnotation(type=MyInt, qualifiers={}, metadata=[])
          ```

        - `'lenient'`: Try to parse type aliases, and fallback to `'skip'` if the type alias
          can't be inspected (because of an undefined forward reference):
          ```pycon
          >>> type MyInt = Annotated[Undefined, 'meta']
          >>> inspect_annotation(MyInt, annotation_source=AnnotationSource.BARE, unpack_type_aliases='lenient')
          InspectedAnnotation(type=MyInt, qualifiers={}, metadata=[])
          >>> Undefined = int
          >>> inspect_annotation(MyInt, annotation_source=AnnotationSource.BARE, unpack_type_aliases='lenient')
          InspectedAnnotation(type=int, qualifiers={}, metadata=['meta'])
          ```

        - `'eager'`: Parse type aliases and raise any encountered [`NameError`][] exceptions.

Returns:
    The result of the inspected annotation, where the type expression, used qualifiers and metadata is stored.

Example:
    ```pycon
    >>> inspect_annotation(
    ...     Final[Annotated[ClassVar[Annotated[int, 'meta_1']], 'meta_2']],
    ...     annotation_source=AnnotationSource.CLASS,
    ... )
    ...
    InspectedAnnotation(type=int, qualifiers={'class_var', 'final'}, metadata=['meta_1', 'meta_2'])
    ```
)r5   r_   r^   ra   rc   rb   r`   )ro   rk   Ú_unpack_annotatedr   r   Úis_classvarr   ÚaddrI   Úis_finalÚis_requiredÚis_notrequiredÚis_readonlyr-   r   r   r   r>   r‡   r   )r8   r“   r5   ro   r�   r‘   Ú_metaÚorigins   "$$     r   Úinspect_annotationrž   ƒ  s}  € ðp +×=Ñ=ÐÜ!$£€JØ€Hà
Ü-¨jÔbÑˆ
ßØÕ'ˆHÙä˜JÓ'ˆØÓÜ×)Ò)¨&×1Ò1ØÐ&8Ô8Ü,¨[Ó9Ð9Ø—‘˜{Ô+Ø'×0Ñ0°Õ3’
Ü×(Ò(¨×0Ò0ØÐ"4Ô4Ü,¨WÓ5Ð5Ø—‘˜wÔ'Ø'×0Ñ0°Õ3’
Ü×+Ò+¨F×3Ò3ØÐ%7Ô7Ü,¨ZÓ8Ð8Ø—‘˜zÔ*Ø'×0Ñ0°Õ3“
Ü×.Ò.¨v×6Ò6Ø!Ð);Ô;Ü,¨^Ó<Ð<Ø—‘˜~Ô.Ø'×0Ñ0°Õ3“
Ü×+Ò+¨F×3Ò3ØÐ&8Ô8Ü,¨^Ó<Ð<Ø—‘˜{Ô+Ø'×0Ñ0°Õ3“
ð Ü˜
¤G×,Ò,ØÐ!3Ô3Ü(¨Ó4Ð4Ø�N‰N˜:Ô&Üœc :§?¡?Ó3‹Jàô ×Ò˜z×*Ò*ØÐ,Ô,Ü$ WÓ-Ð-Ø�‰�wÔÜ‰
Ü	×	#Ò	# J×	/Ò	/ØÐ0Ô0Ü$ [Ó1Ð1Ø�‰�{Ô#Ü‰
Ø	”wÓ	ØÐ/Ô/Ü$ ZÓ0Ð0Ø�‰�zÔ"Üˆ
ä˜z°xÓ@Ð@r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r8   r   r5   zLiteral['lenient', 'eager']Úcheck_annotatedr   r   útuple[Any, list[Any]]r   )r   s   "r   r   r   ÿ  s,   € ÷ ?ñ ?Øð?Ø*Eð?ØX\ð?àñ?r   c                ó²  € \        V 4      pV'       dX   \        P                  ! V4      '       d<   V P                  p\	        V P
                  4      p\        WAR R7      w  rFWe,           pWE3# \        P                  ! V 4      '       d,    V P                  p\        WqRR7      w  r…V'       d   W…3# V . 3# \        P                  ! V4      '       d?    VP                  p WpP                  ,          p\        WqRR7      w  r…V'       d   W…3# V . 3# V . 3#   \         d    TR8X  d   h  T . 3# i ; i  \         d     LKi ; i  \         d    TR8X  d   h  T . 3# i ; i)F©r5   r    Tr6   )r   r   Úis_annotatedÚ
__origin__ÚlistÚ__metadata__Ú_unpack_annotated_innerrJ   rK   rN   rI   r2   )	r8   r5   r    r�   Úannotated_typer‘   Úsub_metar*   Útyps	   &&&      r   r¨   r¨   ÿ  s�  € ô ˜
Ó#€Fßœ>×6Ò6°v×>Ò>Ø#×.Ñ.ˆÜ˜
×/Ñ/Ó0ˆô
 $;ØÐUZô$
Ñ ˆð Õ&ˆØÐ'Ð'Ü	×	(Ò	(¨×	4Ò	4ð	"Ø×(Ñ(ˆEô
 4ØÐPTô‰MˆC÷ ð �}Ð$Ø˜r�>Ð!Ü	×	(Ò	(¨×	0Ò	0ð	"Ø×$Ñ$ˆEðð ×1Ñ1Õ2�ô
 4ØÐPTô‰MˆC÷ Ø�}Ð$Ø˜r�>Ð!à�rˆ>ÐøôY ô 	Ø" gÔ-Øð .ðV �rˆ>ÐðY	ûôB ô ñ ðûô ô 	Ø" gÔ-Øð .ð0 �rˆ>Ðð3	ús6   ÂD ÃD= ÃD, ÄD)Ä(D)Ä,D:Ä9D:Ä=EÅEc               ó$   € V ^8„  d   QhRRRRRR/# )r   r8   r   r5   r9   r   r¡   r   )r   s   "r   r   r   B  s)   € ÷ 	nñ 	nØð	nØ0Sð	nàñ	nr   c              ó¾   € VR 8X  dK   \         P                  ! \        V 4      4      '       d"   V P                  \	        V P
                  4      3# V . 3# \        WRR7      # )r;   Tr£   )r   r¤   r   r¥   r¦   r§   r¨   )r8   r5   s   "$r   r•   r•   B  sV   € ð ˜fÔ$Ü×&Ò&¤z°*Ó'=×>Ò>Ø×(Ñ(¬$¨z×/FÑ/FÓ*GÐGÐGà˜r�>Ð!ä" :ÐhlÔmÐmr   )r   r   r   r   rL   rž   r$   )é   é   )r®   é
   )ra   rc   rb   r_   r`   r^   )-Ú__conditional_annotations__ru   Ú
__future__r   Úsysr'   Úcollections.abcr   Údataclassesr   Úenumr   r   r   Útypingr   r	   r
   r   Útyping_extensionsr   r   r   r   Ú r   Ú__all__Úversion_infor$   r3   rL   r   r€   rk   rY   r   Ú	Exceptionr   r‚   r‡   rŽ   r   rž   r¨   r•   )r±   s   @r   Ú<module>r½      s9  øðÜ Kå "ã 
Û Ý %Ý ß $Ñ $ß 1Ó 1ç KÓ Kå ð€ð ×Ñ�wÔ #×"2Ñ"2°WÔ"<ö,õDFõ@oðm+ð ð	m+ð
 @G÷m+ð` ÐhÕi€	ˆ9Ó iØ á"%¡h¨yÓ&9Ó":€�Ó :ô
n�wô nôb#˜ô #ô�tô ð ×
"Ñ
"€Ø Cà Ð!1×!9Ñ!9Õ:€ˆYÓ :Ø Zô"˜*ô "ð0yAð
 @F÷yAõx?ðF	nØV]÷	nñ 	nr   