+
    ei  c                   s  a  R t+0 t R t^ RIHtHt ^ RIHtHtHtH	t	 ^ RI
t. t] ^ k R R ltR R ltR R	 ltR
t] ^k ]! 4       t] ^k ]! 4       t] ^k ]! 4       t] ^k  ]'       d   ^ RIHt ^ RIt^ RIHt ^ RIHtHtHt ^ RIHtH t  ]].]PB                  PD                  3,          t#] ^k R R lt$R R lt%R R lt& ! R R] 4      t'R R lt(R#   ]) d   t*R R lt( Rt*A*R# Rt*A*ii ; i)a  A mypy_ plugin for managing a number of platform-specific annotations.
Its functionality can be split into three distinct parts:

* Assigning the (platform-dependent) precisions of certain `~numpy.number`
  subclasses, including the likes of `~numpy.int_`, `~numpy.intp` and
  `~numpy.longlong`. See the documentation on
  :ref:`scalar types <arrays.scalars.built-in>` for a comprehensive overview
  of the affected classes. Without the plugin the precision of all relevant
  classes will be inferred as `~typing.Any`.
* Removing all extended-precision `~numpy.number` subclasses that are
  unavailable for the platform in question. Most notably this includes the
  likes of `~numpy.float128` and `~numpy.complex256`. Without the plugin *all*
  extended-precision types will, as far as mypy is concerned, be available
  to all platforms.
* Assigning the (platform-dependent) precision of `~numpy.ctypeslib.c_intp`.
  Without the plugin the type will default to `ctypes.c_int64`.

  .. versionadded:: 1.22

.. deprecated:: 2.3

Examples
--------
To enable the plugin, one must add it to their mypy `configuration file`_:

.. code-block:: ini

    [mypy]
    plugins = numpy.typing.mypy_plugin

.. _mypy: https://mypy-lang.org/
.. _configuration file: https://mypy.readthedocs.io/en/stable/config_file.html

)CallableIterable)TYPE_CHECKINGFinal	TypeAliascastNc                sF    V ^8  d   QhR\         \        \        3,          /#    return)Zdictstrformat   "?/usr/lib64/python3.14/site-packages/numpy/typing/mypy_plugin.py__annotate__r   ,   s      T#s(^     c                  s   R \         P                  3R\         P                  3R\         P                  3R\         P                  3R\         P
                  3R\         P                  3R\         P                  3R\         P                  3R\         P                  3R	\         P                  3R
\         P                  3.p / pV  FD  w  r#^\         P                  ! V4      P                  ,          p\         RV R2V\         RV 2&   KF  	  V# )Z	_NBitByteZ
_NBitShortZ	_NBitIntCZ	_NBitIntPZ_NBitIntZ	_NBitLongZ_NBitLongLongZ	_NBitHalfZ_NBitSingleZ_NBitDoubleZ_NBitLongDoublez._nbit_base._ZBit._nbit.)npZbyteZshortZintcZintpZint_ZlongZlonglongZhalfZsingleZdoubleZ
longdoubledtypeZitemsize_MODULE)namesZretnametypns        r   _get_precision_dictr   ,   s    	bgg	rxx 	bgg	bgg	RWW	bgg	"++&	bgg			"			"	BMM*E C	&&&,39M!C)Hwiwtf%&  Jr   c                s:    V ^8  d   QhR\         \        ,          /# r   )listr	   r
   r   r   r   r   B   s     9 9d3i 9r   c                  sh    . ROp V  Uu. uF  p\        \        V4      '       g   K  VNK  	  up# u upi )float96)r   Zfloat128Z
complex192Z
complex256)Zhasattrr   )Zextended_namesis     r   _get_extended_precision_listr   B   s-    N &8~!QAA~888s   //c                s$    V ^8  d   QhR\         /# r   )r	   r
   r   r   r   r   K   s     ( (# (r   c                  sn    R RRRRR/P                  \        P                  ! R4      P                  R4      # )r   Zc_intZlZc_longZqZ
c_longlongr   )Zgetr   r   Zchar r   r   _get_c_intp_namer   K   s9     	WX\ 
c"((3-

h'	(r   znumpy._typing)TypeAnalyser)PRI_MED)
ImportFromMypyFile	Statement)AnalyzeTypeContextPluginc                sX    V ^8  d   QhR\         R\        P                  P                  /# )r   ctxr   )r$   mypytypesTyper
   r   r   r   r   s   s#     > >% >$**// >r   c                s    V w  rpVP                   P                  R4      R,          p\        \         RV 2,          p\	        RV4      P                  V4      # )z;Replace a type-alias with a concrete ``NBitBase`` subclass.Z.r   r   )r   Zsplit_PRECISION_DICTr   r   Z
named_type)r&   r   Z_Zapir   Zname_news   &     r   _hookr,   s   sO    xx~~c"2&"gYgdV#<=NC(33H==r   c                sR    V ^8  d   QhR\         \        ,          R\        R\        /# )r   iterableidr   )r   r#   r	   intr
   r   r   r   r   z   s&     ; ;), ;# ;# ;r   c                st    \        V 4       F  w  r#\        VRR4      V8X  g   K  Vu # 	  \        RV: 24      h)z>Identify the first ``ImportFrom`` instance the specified `id`.r.   NzBFailed to identify a `ImportFrom` instance with the following id: )Z	enumerateZgetattrZ
ValueError)r-   r.   r   Zvalue   &&  r   _indexr1   z   sG    !(+HAudD)R/ ,  335&: ; 	;r   c          
      s    V ^8  d   QhR\         R\        R\        \        \        \        R,          3,          ,          RR/# )r   filemoduleimportsNr   )r"   r	   r   tupler
   r   r   r   r      sB           eCtO,-  
	 r   c                s    \        V^ VR7      pRVn        V P                  \        RV P                  4      3 F  p\        WA4      pW4V&   K  	  R# )z<Override the first `module`-based import with new `imports`.)r   Tzlist[Statement]N)r!   Zis_top_levelZdefsr   r4   r1   )r2   r3   r4   Z
import_objZlstr   s   &&&   r   _override_importsr6      sM      9
"&
 IIt$5t||DECs#AF Fr   c                   sH   a  ] tR t^t o RtV 3R lR ltV 3R lR ltRtV tR# )_NumpyPluginz>A mypy plugin for handling versus numpy-specific typing tasks.c                s4   < V ^8  d   QhRS[ RS[R,          /# )r   fullnamer   N)r	   	_HookFuncr   __classdict__   "r   r   _NumpyPlugin.__annotate__   s      	 	# 	)d:J 	r   c                s(    V\         9   d   \        # R# )zSet the precision of platform-specific `numpy.number`
subclasses.

For example: `numpy.int_`, `numpy.longlong` and `numpy.longdouble`.
N)r+   r,   )selfr8   s   &&r   get_type_analyze_hookZ"_NumpyPlugin.get_type_analyze_hook   s     ?*r   c                sP   < V ^8  d   QhRS[ RS[S[S[S[S[3,          ,          /# )r   r2   r   )r"   r   r5   r/   r	   r:   r<   r   r   r=      s-     	- 	- 	-%S#&'	-r   c           	     s    VP                   pVR8X  d,   \        T\         R2\         Uu. uF  q3V3NK  	  upR7       MVR8X  d   \        VR\        R3.R7       \
        VR3.# u upi )zHandle all import-based overrides.

* Import platform-specific extended-precision `numpy.number`
  subclasses (*e.g.* `numpy.float96` and `numpy.float128`).
* Import the appropriate `ctypes` equivalent to `numpy.intp`.

numpyz._extended_precision)r4   znumpy.ctypeslibZctypesZ_c_intpr*   )r8   r6   r   _EXTENDED_PRECISION_LIST_C_INTPr    )r>   r2   r8   Zvr0   r   get_additional_depsZ _NumpyPlugin.get_additional_deps   s}     }}H7"!i34-EF-EV-EF
 ..!%y12
 h+,, Gs   A%r   N)	Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__r?   rC   Z__static_attributes__Z__classdictcell__)r;      @r   r7   r7      s     L	 		- 	-r   r7   c                0    V ^8  d   QhR\         R\        /# r   versionr   r	   Ztyper
   r   r   r   r      s        r   c                 s\    ^ RI pRpRV RV R2pVP                  V\        ^R7       \        # )i    Nznumpy.typing.mypy_pluginZ`zS` is deprecated, and will be removed in a future release. Please remove `plugins = z/` in your mypy config.(deprecated in NumPy 2.3))Z
stacklevel)warningsZwarnZDeprecationWarningr7   )rH   rJ   pluginZwarn_msgs   &   r   rK   rK      sG    + x 117 9() 	
 	h 2qAr   c                rF   rG   rI   r
   r   r   r   r   l   s        r   c                 s    \         h)N)e)rH   s   &r   rK   rK   l   s    r   c                s   V ^8  d   Qh/ ^ \         9   d   \        \        ,          ;R&   ^\         9   d
   \        ;R&   ^\         9   d
   \        ;R&   ^\         9   d
   \        ;R&   ^\         9   d
   \        ;R&   ^\         9   d
   \        ;R&   # )r   __all__r   r+   rA   rB   r9   )__conditional_annotations__r   r	   r   r   r
   r   r   r   r      s     ! !P  c Q!f !    g!n / . .o!t A @% @u!z $ # #{!` KJyJa!r   ),rN   rD   Zcollections.abcr    r   Ztypingr   r   r   r   r@   r   rM   r   r   r   r   r+   rA   rB   Zmypy.typeanalr   Z
mypy.typesr'   Z
mypy.buildr    Z
mypy.nodesr!   r"   r#   Zmypy.pluginr$   r%   r(   r)   r9   r,   r1   r6   r7   rK   ZModuleNotFoundErrorrL   r   )rN   rE   r   <module>rO      s   !F / 8 8  ,9( !   -. . #?"@  @ "# #b."::6 $%7$8$**//$IJIJ>; $-v $-L[   s   !C )"C C,C''C,