+
     ohC  c                   sd  a  Ro tt0 t R t^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIHtHt ^ RIHtHt ^ RIt^ RIHtHtHtHt Rpt]P,                  R#,          Rq8H  tR$ R% ltR& R' lt]P,                  Rq8  d   ^ R(IHt M]! R4      t]! R)R4      tR*]n        ]! R+R4      tR,]n        ]! R-R4      tR.]n        ]! R/R	4      tR0]n        ]! R1R
4      t R2] n        ]! R3R4      t!R4]!n        ]! R5R4      t"R6]"n        ]! R7R4      t#R8]#n        ]! R9R4      t$R:]$n        ]! R;R4      t%R<]%n        ]! R=R 4      t&R>]&n        ]! R?R!4      t'R@]'n        RA RB lt(]! RCR4      t)RD])n        ]! RER4      t*RF]*n        ]P,                  Rq8  d   ]! RGR4      t+MRH RI lt+RJ]+n        ]! RKR4      t,RL],n        ]! RMR4      t-RN]-n        ]! ROR4      t.RP].n        ]! RQR4      t/RR]/n        ]! RSR4      t0RT]0n        ]! RUR4      t1RV]1n        ]! RWR4      t2RX]2n        ]! RYR4      t3RZ]3n        ]! R[R4      t4R\]4n        ]! R]R4      t5R^]5n        ]! R_R4      t6R`]6n        ]! RaR4      t7Rb]7n        ]! RcRd4      t8]'       d   Re Rf lt9M	]! RcR4      t9Rg]9n        ]! RhR"4      t:Ri]:n        ]P,                  Rr8  d   Rj Rk lt;MRl Rm lt;Rn];n        / ]Px                  ]Pz                  Px                  b]P|                  ]Pz                  P|                  b]P~                  ]Pz                  P~                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b/ ]P                  ]Pz                  P                  b]P                  ]Qb]P                  ]Sb]P                  ]P                  b]P                  ]Vb]P                  ]Xb]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  b]P                  ]^b]P                  ]P                  b]P                  ]P                  b]P                  ]P                  b]P                  ]P                  b]P                  ]Pz                  P                  b]P                  ]Pz                  P                  bC]P                  ]]P                  ]P                  ]P                  ]P                  ]P                  ]P                  ]P                  ]P                  /Ctm] ^ k  ]S! ]mP                  4       4       F%  w  totp]q! ]]oP                  R4      ;tsf   K   ]p]m]s&   K'  	  R# )szLow-level introspection utilities for [`typing`][] members.

The provided functions in this module check against both the [`typing`][] and [`typing_extensions`][]
variants, if they exists and are different.
N)dedent)FunctionTypeGenericAlias)AnyFinal)LiteralStringTypeAliasTypeTypeIs
deprecatedis_annotatedis_anyis_classvaris_concatenateis_finalis_forwardref
is_generic
is_literalis_literalstringis_never
is_newtypeis_nodefaultis_noextraitemsis_noreturnis_notrequiredis_paramspecis_paramspecargsis_paramspeckwargsis_readonlyis_requiredis_selfis_typealiasis_typealiastypeis_typeguard	is_typeis
is_typevaris_typevartupleis_union	is_unpack:N   Nc                <    V ^8  d   QhR\         R\         R\        /# r&   memberfunction_namereturnr   r   Zformat   "E/usr/lib/python3.14/site-packages/typing_inspection/typing_objects.py__annotate__r0   <   s"     *" *"] *"= *"]i *"    c                s   \        \        V 4      p\        \        V 4      pV'       d:   V'       d2   \        \        V 4      \        \        V 4      J d   RV  2pM7RV  RV  2pM.V'       d   V'       g   RV  2pMV'       g   V'       d   RV  2pMRp\	        RV RV R24      p/ pR\
        R	\        R
\        /p\        WWV4       Wa,          # )a;  Create a function checking that the function argument is the (unparameterized) typing `member`.

The function will make sure to check against both the `typing` and `typing_extensions`
variants as depending on the Python version, the `typing_extensions` variant might be different.
For instance, on Python 3.9:

```pycon
>>> from typing import Literal as t_Literal
>>> from typing_extensions import Literal as te_Literal, get_origin

>>> t_Literal is te_Literal
False
>>> get_origin(t_Literal[1])
typing.Literal
>>> get_origin(te_Literal[1])
typing_extensions.Literal
```
zobj is typing.z or obj is typing_extensions.zobj is typing_extensions.False	
    def z&(obj: Any, /) -> bool:
        return 
    r   typingtyping_extensionshasattrr5   r6   getattrr    r   Zexecr)   r*   Z	in_typingZin_typing_extensionsZ
check_codeZ	func_codeZlocals_Zglobals_   &&      r/    _compile_identity_check_functionr<   <   s    & 'I"#4f=)66"g.?&HH)&2J)&1NvhWJ	/%fX.
/09

 		 |  	I
 !G %sHf>QSdeHg&!!r1   c                r'   r(   r,   r-   r.   r/   r0   r0   i   s"     " "} "] "_k "r1   c           	     s   \        \        V 4      p\        \        V 4      pV'       d<   V'       d4   \        \        V 4      \        \        V 4      J d   RV  R2pM:RV  RV  R2pM0V'       d   V'       g   RV  R2pMV'       g   V'       d   RV  R2pMRp\	        RV R	V  R
V R24      p/ pR\
        R\        R\        /p\        WWV4       Wa,          # )a  Create a function checking that the function is an instance of the typing `member`.

The function will make sure to check against both the `typing` and `typing_extensions`
variants as depending on the Python version, the `typing_extensions` variant might be different.
zisinstance(obj, typing.Z)zisinstance(obj, (typing.z, typing_extensions.z))z"isinstance(obj, typing_extensions.r2   r3   z(obj: Any, /) -> 'TypeIs[z]':
        return r4   r   r5   r6   r7   r:   r;   r/   "_compile_isinstance_check_functionr=   i   s     'I"#4f=)66"g.?&HH26(!<J3F8;OPVxWYZJ	/.vha8
/9&C

 		0 9|  	I
 !G %sHf>QSdeHg&!!r1   )NoneTypeZ	Annotatedz
Return whether the argument is the [`Annotated`][typing.Annotated] [special form][].

```pycon
>>> is_annotated(Annotated)
True
>>> is_annotated(Annotated[int, ...])
False
```
r   zm
Return whether the argument is the [`Any`][typing.Any] [special form][].

```pycon
>>> is_any(Any)
True
```
ZClassVarz
Return whether the argument is the [`ClassVar`][typing.ClassVar] [type qualifier][].

```pycon
>>> is_classvar(ClassVar)
True
>>> is_classvar(ClassVar[int])
>>> False
```
ZConcatenatez
Return whether the argument is the [`Concatenate`][typing.Concatenate] [special form][].

```pycon
>>> is_concatenate(Concatenate)
True
>>> is_concatenate(Concatenate[int, P])
False
```
r   z
Return whether the argument is the [`Final`][typing.Final] [type qualifier][].

```pycon
>>> is_final(Final)
True
>>> is_final(Final[int])
False
```
Z
ForwardRefz
Return whether the argument is an instance of [`ForwardRef`][typing.ForwardRef].

```pycon
>>> is_forwardref(ForwardRef('T'))
True
```
ZGenericz
Return whether the argument is the [`Generic`][typing.Generic] [special form][].

```pycon
>>> is_generic(Generic)
True
>>> is_generic(Generic[T])
False
```
ZLiteralz
Return whether the argument is the [`Literal`][typing.Literal] [special form][].

```pycon
>>> is_literal(Literal)
True
>>> is_literal(Literal["a"])
False
```
Z	ParamSpecz
Return whether the argument is an instance of [`ParamSpec`][typing.ParamSpec].

```pycon
>>> P = ParamSpec('P')
>>> is_paramspec(P)
True
```
ZTypeVarz
Return whether the argument is an instance of [`TypeVar`][typing.TypeVar].

```pycon
>>> T = TypeVar('T')
>>> is_typevar(T)
True
```
ZTypeVarTuplez
Return whether the argument is an instance of [`TypeVarTuple`][typing.TypeVarTuple].

```pycon
>>> Ts = TypeVarTuple('Ts')
>>> is_typevartuple(Ts)
True
```
ZUniona  
Return whether the argument is the [`Union`][typing.Union] [special form][].

This function can also be used to check for the [`Optional`][typing.Optional] [special form][],
as at runtime, `Optional[int]` is equivalent to `Union[int, None]`.

```pycon
>>> is_union(Union)
True
>>> is_union(Union[int, str])
False
```

!!! warning
    This does not check for unions using the [new syntax][types-union] (e.g. `int | str`).
c                0    V ^8  d   QhR\         R\        /# r&   objr+   r   Zboolr-   r.   r/   r0   r0   *  s     X Xs X$ Xr1   c               sz    \        V \        4      ;'       d%    \        V \        4      ;'       d    \	        V R4      # )a  Return whether the argument is a named tuple type.

This includes [`NamedTuple`][typing.NamedTuple] subclasses and classes created from the
[`collections.namedtuple`][] factory function.

```pycon
>>> class User(NamedTuple):
...     name: str
...
>>> is_namedtuple(User)
True
>>> City = collections.namedtuple('City', [])
>>> is_namedtuple(City)
True
>>> is_namedtuple(NamedTuple)
False
```
Z_fields)
isinstancetypeZ
issubclasstupler8   rA   r.   r/   is_namedtuplerG   *  s/    & c4 WWZU%;WWY@WWr1   r   z
Return whether the argument is the [`LiteralString`][typing.LiteralString] [special form][].

```pycon
>>> is_literalstring(LiteralString)
True
```
ZNeverzu
Return whether the argument is the [`Never`][typing.Never] [special form][].

```pycon
>>> is_never(Never)
True
```
ZNewTypec                r?   r@   rB   r-   r.   r/   r0   r0   \  s     - - -4 -r1   c                s    \        V R 4      # )Z__supertype__)r8   rF   r.   r/   r   r   \  s    sO,,r1   z
Return whether the argument is a [`NewType`][typing.NewType].

```pycon
>>> UserId = NewType("UserId", int)
>>> is_newtype(UserId)
True
```
Z	NoDefaultz
Return whether the argument is the [`NoDefault`][typing.NoDefault] sentinel object.

```pycon
>>> is_nodefault(NoDefault)
True
```
ZNoExtraItemszy
Return whether the argument is the `NoExtraItems` sentinel object.

```pycon
>>> is_noextraitems(NoExtraItems)
True
```
ZNoReturnz
Return whether the argument is the [`NoReturn`][typing.NoReturn] [special form][].

```pycon
>>> is_noreturn(NoReturn)
True
>>> is_noreturn(Never)
False
```
ZNotRequiredz
Return whether the argument is the [`NotRequired`][typing.NotRequired] [special form][].

```pycon
>>> is_notrequired(NotRequired)
True
```
ZParamSpecArgsz
Return whether the argument is an instance of [`ParamSpecArgs`][typing.ParamSpecArgs].

```pycon
>>> P = ParamSpec('P')
>>> is_paramspecargs(P.args)
True
```
ZParamSpecKwargsz
Return whether the argument is an instance of [`ParamSpecKwargs`][typing.ParamSpecKwargs].

```pycon
>>> P = ParamSpec('P')
>>> is_paramspeckwargs(P.kwargs)
True
```
ZReadOnlyz
Return whether the argument is the [`ReadOnly`][typing.ReadOnly] [special form][].

```pycon
>>> is_readonly(ReadOnly)
True
```
ZRequiredz
Return whether the argument is the [`Required`][typing.Required] [special form][].

```pycon
>>> is_required(Required)
True
```
ZSelfzq
Return whether the argument is the [`Self`][typing.Self] [special form][].

```pycon
>>> is_self(Self)
True
```
Z	TypeAliasz
Return whether the argument is the [`TypeAlias`][typing.TypeAlias] [special form][].

```pycon
>>> is_typealias(TypeAlias)
True
```
Z	TypeGuardz
Return whether the argument is the [`TypeGuard`][typing.TypeGuard] [special form][].

```pycon
>>> is_typeguard(TypeGuard)
True
```
r   zy
Return whether the argument is the [`TypeIs`][typing.TypeIs] [special form][].

```pycon
>>> is_typeis(TypeIs)
True
```
r   _is_typealiastype_innerc                (    V ^8  d   QhR\         RR/# )r&   rA   r+   zTypeIs[TypeAliasType]r   r-   r.   r/   r0   r0     s     N Nc N)@ Nr1   c                sJ    \        V 4      \        J;'       d    \        V 4      # N)rD   r   rH   rF   r.   r/   r   r     s    Cy,MM1H1MMr1   a'  
Return whether the argument is a [`TypeAliasType`][typing.TypeAliasType] instance.

```pycon
>>> type MyInt = int
>>> is_typealiastype(MyInt)
True
>>> MyStr = TypeAliasType("MyStr", str)
>>> is_typealiastype(MyStr):
True
>>> type MyList[T] = list[T]
>>> is_typealiastype(MyList[int])
False
```
ZUnpackz
Return whether the argument is the [`Unpack`][typing.Unpack] [special form][].

```pycon
>>> is_unpack(Unpack)
True
>>> is_unpack(Unpack[Ts])
False
```
c                rI   r&   rA   r+   zTypeIs[deprecated]rJ   r-   r.   r/   r0   r0     s     T T3 T&: Tr1   c                sV    \        V \        P                  \        P                  34      # rK   )rC   warningsr   r6   rF   r.   r/   is_deprecatedrN     s!    # 3 35F5Q5QRSSr1   c                rI   rL   rJ   r-   r.   r/   r0   r0     s     = =3 =&: =r1   c                s6    \        V \        P                  4      # rK   )rC   r6   r   rF   r.   r/   rN   rN     s    #0;;<<r1   a+  
Return whether the argument is a [`deprecated`][warnings.deprecated] instance.

This also includes the [`typing_extensions` backport][typing_extensions.deprecated].

```pycon
>>> is_deprecated(warnings.deprecated('message'))
True
>>> is_deprecated(typing_extensions.deprecated('message'))
True
```
c                s    V ^8  d   Qh/ ^ \         9   d1   \        \        \        \        \        ,          3,          ,          ;R&   # )r&   DEPRECATED_ALIASES)__conditional_annotations__r   dictr   rD   r-   r.   r/   r0   r0      s6      V+ +E$sDI~./ +Wr1   )!rO   r>   r	   r
   r   r   rN   r   r   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   )   i
   )rR   i   )urP   Z__doc__Zcollections.abcZcollectionsZ
contextlibZreZsysr5   rM   Ztextwrapr    Ztypesr   r   r   r   r6   r   r   r   r   Z__all__Zversion_infoZ	_IS_PY310r<   r=   r>   rD   r	   r
   r   r   r   r   r   r   r   r"   r#   r$   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   rH   r   r%   rN   ZHashableZabcZ	AwaitableZ	CoroutineZAsyncIterableZAsyncIteratorZIterableZIteratorZ
ReversibleZSizedZ	ContainerZ
CollectionZCallableZAbstractSetZSetZ
MutableSetZMappingZMutableMappingZSequenceZMutableSequenceZTuplerE   ZListZlistZDequeZdequeZsetZ	FrozenSetZ	frozensetZMappingViewZKeysViewZ	ItemsViewZ
ValuesViewZDictrQ   ZDefaultDictZdefaultdictZOrderedDictZCounterZChainMapZ	GeneratorZAsyncGeneratorZTypeZPatternZMatchZContextManagerZAbstractContextManagerZAsyncContextManagerZAbstractAsyncContextManagerrO   ZitemsZaliasZtargetr9   Z_nameZte_aliasr0   )rP   s   @r/   <module>rS      s     	 
    ,   N N"H R G+	*"Z"@ wDzH 0^L	  
*%	: /z=I	  2-AQR	  ,GZ@	  3<Q  .iF
	
  .iF
	
  2+~N  0	<H

  5^EVW  ,GZ@ $X4 4OEWX    ,GZ@  w3I|LJ-
  0^L  3>CTU  /z=I	  2-AQR  6oGYZ    88IK_`    /z=I  /z=I  +69
= 0^L  0^L  -X{C		  =_Ngh  
N :/K]^    -X{C			  wT
= +3
OO[__--+3
koo//+3 koo//+3 +//77	+3
 +//77+3 OO[__--+3 OO[__--+3 {11+3 LL+//''+3 koo//+3 {11+3 OO[__--+3 +++3 {11+3  NNKOO++!+3" ;??99#+3$ OO[__--%+3& KOO;;'+3( LL%)+3* KK++3, LL+##-+3. JJ/+30 i1+32 333+34 OO[__--5+36 koo//7+38 {119+3: KK;+3< //=+3> //?+3@ NNK''A+3B OO[))C+3D koo//E+3F ;??99G+3H KK
NNBJJ
LL"((
:<<

 F FS+3  +X A ,2245ME6-u{{DAAN'-8$ 6r1   