
    pg\j              
       "   % S r SSKJrJr  SSKJrJrJr  SSKr	/ r
\\   \S'   S\\\4   4S jrS\\   4S jrS\4S	 jrS
r\\S'   \" 5       r\\S'   \" 5       r\\S'   \" 5       r\\S'    \(       a  SSKJr  SSKrSSKJr  SSKJrJrJr  SSK J!r!J"r"  SSS 47r#S\!S\RH                  RJ                  4S jr&S\\   S\S\'4S jr(S\S\S\\)\\S-  4      SS4S jr* " S S\"5      r+S \S\,4S! jr-g! \. a  r/S \S\,4S" jr- Sr/C/gSr/C/ff = f)#aK  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
    The :mod:`numpy.typing.mypy_plugin` entry-point is deprecated in favor of
    platform-agnostic static type inference. Remove
    ``numpy.typing.mypy_plugin`` from the ``plugins`` section of your mypy
    configuration; if that surfaces new errors, please open an issue with a
    minimal reproducer.

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castN__all__returnc                     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U  H@  u  p#S[         R                  " U5      R                  -  n[         SU S3U[         SU 3'   MB     U$ )N	_NBitByte
_NBitShort	_NBitIntC	_NBitIntP_NBitInt	_NBitLong_NBitLongLong	_NBitHalf_NBitSingle_NBitDouble_NBitLongDouble   z._nbit_base._Bit._nbit.)npbyteshortintcintpint_longlonglonghalfsingledouble
longdoubledtypeitemsize_MODULE)namesretnametypns        S/home/edenadmin/noVNC/venv/lib/python3.13/site-packages/numpy/typing/mypy_plugin.py_get_precision_dictr.   1   s    	bgg	rxx 	bgg	bgg	RWW	bgg	"++&	bgg			"			"	BMM*E C	&&&,39M!C)Hwiwtf%&  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)float96float128
complex192
complex256)hasattrr   )extended_namesis     r-   _get_extended_precision_listr8   G   s+    N &8~!QA~888s   //c                  j    SSSS.R                  [        R                  " S5      R                  S5      $ )Nc_intc_long
c_longlong)r7   lqr,   )getr   r%   char r/   r-   _get_c_intp_namerB   P   s3      
c"((3-

h'	(r/   znumpy._typingr'   _PRECISION_DICT_EXTENDED_PRECISION_LIST_C_INTP)TypeAnalyser)PRI_MED)
ImportFromMypyFile	Statement)AnalyzeTypeContextPlugin	_HookFuncc                  R    [         [        /[        R                  R                  4   $ N)r   rK   mypytypesTyperA   r/   r-   rM   rM   v   s    X12DJJOOCDDr/   ctxc                     U u  pnUR                   R                  S5      S   n[        [         SU 3   n[	        SU5      R                  U5      $ )z;Replace a type-alias with a concrete ``NBitBase`` subclass..r   rF   )r*   splitrC   r'   r   
named_type)rS   r+   _apir*   name_news         r-   _hookr\   x   sO    xx~~c"2&"gYgdV#<=NC(33H==r/   iterableidc                 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`.r^   NzBFailed to identify a `ImportFrom` instance with the following id: )	enumerategetattr
ValueError)r]   r^   r7   values       r-   _indexrd      sG    !(+HAudD)R/ ,  335&: ; 	;r/   filemoduleimportsc                     [        USUS9nSUl        U R                  [        SU R                  5      4 H  n[        XA5      nX4U'   M     g)z<Override the first `module`-based import with new `imports`.r   )r(   Tzlist[Statement]N)rH   is_top_leveldefsr   rg   rd   )re   rf   rg   
import_objlstr7   s         r-   _override_importsrm      sM      9
"&
 IIt$5t||DECs#AF Fr/   c                   T    \ rS rSrSrS\S\S-  4S jrS\S\	\
\\\4      4S jrS	rg)
_NumpyPlugin   z>A mypy plugin for handling versus numpy-specific typing tasks.fullnamer	   Nc                 $    U[         ;   a  [        $ g)zSet the precision of platform-specific `numpy.number`
subclasses.

For example: `numpy.int_`, `numpy.longlong` and `numpy.longdouble`.
N)rC   r\   )selfrq   s     r-   get_type_analyze_hook"_NumpyPlugin.get_type_analyze_hook   s     ?*r/   re   c           	          UR                   nUS:X  a)  [        U[         S3[         Vs/ s H  o3U4PM     snS9  OUS:X  a  [        US[        S4/S9  [
        US4/$ s  snf )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)rg   znumpy.ctypeslibctypes_c_intprV   )rq   rm   r'   rD   rE   rG   )rs   re   rq   vs       r-   get_additional_deps _NumpyPlugin.get_additional_deps   s}     }}H7"!i34-EF-EV-EF
 ..!%y12
 h+,, Gs   ArA   )__name__
__module____qualname____firstlineno____doc__strrM   rt   rI   listtupleintr{   __static_attributes__rA   r/   r-   ro   ro      sB    L	# 	)d:J 		- 	-%S#&'	-r/   ro   versionc                 V    SS K nSnSU SU S3nUR                  U[        SS9  [        $ )Nr   znumpy.typing.mypy_plugin`zS` is deprecated, and will be removed in a future release. Please remove `plugins = z/` in your mypy config.(deprecated in NumPy 2.3)   )
stacklevel)warningswarnDeprecationWarningro   )r   r   pluginwarn_msgs       r-   r   r      sG    + x 117 9() 	
 	h 2qAr/   c                     [         erO   )_exc)r   s    r-   r   r   q   s    
r/   )0r   collections.abcr   r   typingr   r   r   rw   r   r   r   r   __annotations__dictr.   r8   rB   r'   rC   rD   rE   mypy.typeanalrF   
mypy.typesrP   
mypy.buildrG   
mypy.nodesrH   rI   rJ   mypy.pluginrK   rL   rM   rQ   rR   r\   r   rd   r   rm   ro   typer   ModuleNotFoundErrorr   rA   r/   r-   <module>r      ss  &P / - - c T#s(^ ,9d3i 9(# ( !   -. . #?"@ % @ "# #b."::6 E>% >$**// >;), ;# ;# ;    eCtO,-  
	 $-v $-L  [     s   -)C5 5D;	D		D