
    KhF                       % S r SSKJr  SSKJrJrJr  SSKr\(       a  SSK	J
r
   SSKrSSKJr  SSKJrJr  SSKJrJrJr  SS	KJr  \\/\4   rSrS
\S'   / rS\S'   SS jrSS jrSS jr\" 5       r S\S'   \" 5       r!S\S'   \" 5       r"S\S'   SS jr#\(       d  \c#  S S jr$        S!S jr% " S S\5      r&S"S jr'gS"S jr'g! \ a  r\r SrCNSrCff = f)#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

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

    )annotations)FinalTYPE_CHECKINGCallableN)Iterable)Type)PluginAnalyzeTypeContext)MypyFile
ImportFrom	Statement)PRI_MEDzNone | ModuleNotFoundErrorMYPY_EX	list[str]__all__c                    S[         R                  4S[         R                  4S[         R                  4S[         R                  4S[         R
                  4S[         R                  4S[         R                  4S[         R                  4S	[         R                  4S
[         R                  4S[         R                  4/n 0 nSnU  H2  u  p4SU" 5       R                  R                  -  nU SU S3X SU 3'   M4     U$ )N	_NBitByte
_NBitShort	_NBitIntC	_NBitIntP_NBitInt	_NBitLong_NBitLongLong	_NBitHalf_NBitSingle_NBitDouble_NBitLongDoubleznumpy._typing   z._nbit_base._Bitz._nbit.)npbyteshortintcintpint_longlonglonghalfsingledouble
longdoubledtypeitemsize)namesretmodulenametypns         J/var/www/html/env/lib/python3.13/site-packages/numpy/typing/mypy_plugin.py_get_precision_dictr5   :   s    	bgg	rxx 	bgg	bgg	RWW	bgg	"++&	bgg			"			"	BMM*E CF	SU[[)))+1(-s#(FhgdV$%  J    c                 h    / SQn U  Vs/ s H  n[        [        U5      (       d  M  UPM     sn$ s  snf )N)uint128uint256int128int256float80float96float128float256
complex160
complex192
complex256
complex512)hasattrr    )extended_namesis     r4   _get_extended_precision_listrG   Q   s+    N &8~!QA~888s   //c                 n    [         R                  " S5      R                  n U S:X  a  gU S:X  a  gU S:X  a  gg)Nr3   rF   c_intlc_longq
c_longlong)r    r,   char)rN   s    r4   _get_c_intp_namerO   b   s6    88C=Ds{		r6   r   _PRECISION_DICT_EXTENDED_PRECISION_LIST_C_INTPc                    U u  pnUR                   R                  S5      S   n[        SU 3   nUR                  U5      $ )z;Replace a type-alias with a concrete ``NBitBase`` subclass..znumpy._typing._nbit.)r1   splitrP   
named_type)ctxr2   _apir1   name_news         r4   _hookr\   z   sC    KCC88>>#r"D!5dV<=H>>(##r6   c                r    [        U 5       H  u  p#[        USS5      U:X  d  M  Us  $    [        SU< 35      e)z>Identify the first ``ImportFrom`` instance the specified `id`.idNzBFailed to identify a `ImportFrom` instance with the following id: )	enumerategetattr
ValueError)iterabler^   rF   values       r4   _indexrd      sG    !(+HAudD)R/ ,  335&: ; 	;r6   c                    [        USUS9nSUl        U R                  U R                  4 H  n[	        XA5      nX4U'   M     g)z<Override the first `module`-based import with new `imports`.r   )r.   TN)r   is_top_leveldefsimportsrd   )filer0   rh   
import_objlstrF   s         r4   _override_importsrl      sD      9
"&
 IIt||,Cs#AF -r6   c                  4    \ rS rSrSrSS jr    SS jrSrg)	_NumpyPlugin   z>A mypy plugin for handling versus numpy-specific typing tasks.c                $    U[         ;   a  [        $ g)zSet the precision of platform-specific `numpy.number`
subclasses.

For example: `numpy.int_`, `numpy.longlong` and `numpy.longdouble`.
N)rP   r\   )selffullnames     r4   get_type_analyze_hook"_NumpyPlugin.get_type_analyze_hook   s     ?*r6   c           	         [         UR                  S4/nUR                  S:X  a#  [        US[         Vs/ s H  o3U4PM     snS9  U$ UR                  S:X  a  [        US[        S4/S9  U$ s  snf )zHandle all import-based overrides.

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

rU   numpyz!numpy._typing._extended_precision)rh   znumpy.ctypeslibctypes_c_intp)r   rr   rl   rQ   rR   )rq   ri   r/   vs       r4   get_additional_deps _NumpyPlugin.get_additional_deps   s     T]]B/0C}}'!=-EF-EV-EF J "33!(%y12 J Gs   A, N)rr   strreturnzNone | _HookFunc)ri   r   r~   zlist[tuple[int, str, int]])__name__
__module____qualname____firstlineno____doc__rs   rz   __static_attributes__r|   r6   r4   rn   rn      s    L		 	'	r6   rn   c                    [         $ zAn entry-point for mypy.)rn   versions    r4   pluginr      s    r6   c                    [         er   )r   r   s    r4   r   r      s    r6   )r~   zdict[str, str])r~   r   )r~   r}   )rX   r
   r~   r   )rb   zIterable[Statement]r^   r}   r~   int)ri   r   r0   r}   rh   zlist[tuple[str, None | str]]r~   None)r   r}   r~   ztype[_NumpyPlugin])(r   
__future__r   typingr   r   r   rv   r    collections.abcr   
mypy.typesmypyr   mypy.pluginr	   r
   
mypy.nodesr   r   r   
mypy.buildr   	_HookFuncr   __annotations__ModuleNotFoundErrorexr   r5   rG   rO   rP   rQ   rR   r\   rd   rl   rn   r   r|   r6   r4   <module>r      s  B # 1 1 (
6::",-t34I*.G'.  .9"
 -. . #?"@ % @ "# #$ GO;    .  
	 $v $L
c  Gs   1C	 	CCC