§
    µ¯¸jè  ã                  ó¤  — U d Z ddlmZ ddlmZ ddlmZmZmZ ddl	Z
	 ddlZddlmZ ddlmZmZ ddlmZmZmZ dd	lmZ eegef         ZdZd
ed<   n# e$ rZeZY dZ[ndZ[ww xY wg Zded<   d.d„Zd/d„Zd0d„Z e¦   «         Z ded<    e¦   «         Z!ded<    e¦   «         Z"ded<   d1d„Z#ese€d2d „Z$d3d'„Z% G d(„ d)e¦  «        Z&d4d,„Z'dS d4d-„Z'dS )5a  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: http://mypy-lang.org/
.. _configuration file: https://mypy.readthedocs.io/en/stable/config_file.html

é    )Úannotations)ÚIterable)ÚFinalÚTYPE_CHECKINGÚCallableN)ÚType)ÚPluginÚAnalyzeTypeContext)ÚMypyFileÚ
ImportFromÚ	Statement)ÚPRI_MEDzNone | ModuleNotFoundErrorÚMYPY_EXú	list[str]Ú__all__Úreturnúdict[str, str]c                 óh  — dt           j        fdt           j        fdt           j        fdt           j        fdt           j        fdt           j        fdt           j        fdt           j        fd	t           j	        fd
t           j
        fg
} i }| D ](\  }}d |¦   «         j        j        z  }d|› d�|d|› �<   Œ)|S )NÚ	_NBitByteÚ
_NBitShortÚ	_NBitIntCÚ	_NBitIntPÚ_NBitIntÚ_NBitLongLongÚ	_NBitHalfÚ_NBitSingleÚ_NBitDoubleÚ_NBitLongDoubleé   znumpy._ÚBitúnumpy._typing._nbit.)ÚnpÚbyteÚshortÚintcÚintpÚint_ÚlonglongÚhalfÚsingleÚdoubleÚ
longdoubleÚdtypeÚitemsize)ÚnamesÚretÚnameÚtypÚns        úh/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/numpy/typing/mypy_plugin.pyÚ_get_precision_dictr5   8   sÂ   € à	•b”gÐØ	•r”xÐ Ø	•b”gÐØ	•b”gÐØ	•R”WÐØ	�"œ+Ð&à	•b”gÐØ	�œ	Ð"Ø	�œ	Ð"Ø	�BœMÐ*ð€Eð €CØð >ð >‰	ˆˆcØ�S�S‘U”U”[Ô)Ñ)ˆØ-=°qÐ-=Ð-=Ð-=ˆÐ) 4Ð)Ð)Ñ*Ð*Ø€Jó    c                 ó"   — g d¢} d„ | D ¦   «         S )N)Úuint128Úuint256Úint128Úint256Úfloat80Úfloat96Úfloat128Úfloat256Ú
complex160Ú
complex192Ú
complex256Ú
complex512c                ó<   — g | ]}t          t          |¦  «        ¯|‘ŒS © )Úhasattrr"   )Ú.0Úis     r4   ú
<listcomp>z0_get_extended_precision_list.<locals>.<listcomp>\   s%   € Ð8Ð8Ð8�!­µ°Q©¬Ð8ˆAÐ8Ð8Ð8r6   rE   )Úextended_namess    r4   Ú_get_extended_precision_listrK   M   s)   € ðð ð €Nð 9Ð8�~Ð8Ñ8Ô8Ð8r6   Ústrc                 óh   — t          j        d¦  «        j        } | dk    rdS | dk    rdS | dk    rdS dS )NÚprH   Úc_intÚlÚc_longÚqÚ
c_longlong)r"   r-   Úchar)rT   s    r4   Ú_get_c_intp_namerU   _   sA   € åŒ8�C‰=Œ=Ô€DØˆs‚{€{ØˆwØ	�ŠˆØˆxØ	�ŠˆØˆ|àˆxr6   r   Ú_PRECISION_DICTÚ_EXTENDED_PRECISION_LISTÚ_C_INTPÚctxr
   r   c                ó˜   — | \  }}}|j                              d¦  «        d         }t          d|› �         }|                     |¦  «        S )z;Replace a type-alias with a concrete ``NBitBase`` subclass.ú.éÿÿÿÿr!   )r1   ÚsplitrV   Ú
named_type)rY   r2   Ú_Úapir1   Úname_news         r4   Ú_hookrb   w   sJ   € à�K€CˆˆCØŒ8�>Š>˜#ÑÔ˜rÔ"€DÝÐ<°dÐ<Ð<Ô=€HØ�>Š>˜(Ñ#Ô#Ð#r6   ÚiterableúIterable[Statement]ÚidÚintc                ó‚   — t          | ¦  «        D ]\  }}t          |dd¦  «        |k    r|c S Œt          d|›�¦  «        ‚)z>Identify the first ``ImportFrom`` instance the specified `id`.re   NzBFailed to identify a `ImportFrom` instance with the following id: )Ú	enumerateÚgetattrÚ
ValueError)rc   re   rH   Úvalues       r4   Ú_indexrl   €   sf   € å! (Ñ+Ô+ð 	ð 	‰HˆAˆuÝ�u˜d DÑ)Ô)¨RÒ/Ð/Ø���ð 0åð :Ø35ð:ð :ñ ;ô ;ð 	;r6   Úfiler   ÚmoduleÚimportsúlist[tuple[str, None | str]]ÚNonec                ó„   — t          |d|¬¦  «        }d|_        | j        | j        fD ]}t	          ||¦  «        }|||<   ŒdS )z<Override the first `module`-based import with new `imports`.r   )r/   TN)r   Úis_top_levelÚdefsro   rl   )rm   rn   ro   Ú
import_objÚlstrH   s         r4   Ú_override_importsrw   ˆ   s^   € õ   ¨°Ð9Ñ9Ô9ˆ
Ø"&ˆ
Ôð ”I˜tœ|Ð,ð 	 ð 	 ˆCÝ�s˜FÑ#Ô#ˆAØˆC�‰FˆFð	 ð 	 r6   c                  ó"   — e Zd ZdZdd„Zdd
„ZdS )Ú_NumpyPluginz>A mypy plugin for handling versus numpy-specific typing tasks.ÚfullnamerL   r   úNone | _HookFuncc                ó&   — |t           v rt          S dS )z«Set the precision of platform-specific `numpy.number`
            subclasses.

            For example: `numpy.int_`, `numpy.longlong` and `numpy.longdouble`.
            N)rV   rb   )Úselfrz   s     r4   Úget_type_analyze_hookz"_NumpyPlugin.get_type_analyze_hookš   s   € ð �?Ð*Ð*Ý�Ø�4r6   rm   r   úlist[tuple[int, str, int]]c                óÊ   — t           |j        dfg}|j        dk    r"t          |dd„ t          D ¦   «         ¬¦  «         n%|j        dk    rt          |dt          dfg¬¦  «         |S )	a.  Handle 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`.

            r\   Únumpyz!numpy._typing._extended_precisionc                ó   — g | ]}||f‘ŒS rE   rE   )rG   Úvs     r4   rI   z4_NumpyPlugin.get_additional_deps.<locals>.<listcomp>´   s   € ÐFÐFÐF¨˜a ˜VÐFÐFÐFr6   )ro   znumpy.ctypeslibÚctypesÚ_c_intp)r   rz   rw   rW   rX   )r}   rm   r0   s      r4   Úget_additional_depsz _NumpyPlugin.get_additional_deps¤   s”   € õ ˜Tœ]¨BÐ/Ð0ˆCàŒ} Ò'Ð'Ý!ØÐ=ØFÐFÕ-EÐFÑFÔFðñ ô ð ð ð ”Ð"3Ò3Ð3Ý!Ø˜(Ý% yÐ1Ð2ðñ ô ð ð ˆJr6   N)rz   rL   r   r{   )rm   r   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r~   r†   rE   r6   r4   ry   ry   —   sB   € € € € € ØLÐLð	ð 	ð 	ð 	ð	ð 	ð 	ð 	ð 	ð 	r6   ry   Úversionútype[_NumpyPlugin]c                ó   — t           S ©zAn entry-point for mypy.)ry   ©r‹   s    r4   Úpluginr�   ½   s   € åÐr6   c                ó   — t           ‚rŽ   )r   r�   s    r4   r�   r�   Â   s   € åˆr6   )r   r   )r   r   )r   rL   )rY   r
   r   r   )rc   rd   re   rL   r   rf   )rm   r   rn   rL   ro   rp   r   rq   )r‹   rL   r   rŒ   )(rŠ   Ú
__future__r   Úcollections.abcr   Útypingr   r   r   r�   r"   Ú
mypy.typesÚmypyr   Úmypy.pluginr	   r
   Ú
mypy.nodesr   r   r   Ú
mypy.buildr   Ú	_HookFuncr   Ú__annotations__ÚModuleNotFoundErrorÚexr   r5   rK   rU   rV   rW   rX   rb   rl   rw   ry   r�   rE   r6   r4   ú<module>rž      s{  ððð ð ðB #Ð "Ð "Ð "Ð "Ð "à $Ð $Ð $Ð $Ð $Ð $Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1à Ð Ð Ð ð
ØÐÐÐØÐÐÐÐÐØ6Ð6Ð6Ð6Ð6Ð6Ð6Ð6Ø:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ø"Ð"Ð"Ð"Ð"Ð"àÐ,Ð-¨tÐ3Ô4€IØ*.€GÐ.Ð.Ð.Ñ.Ð.øØð ð ð Ø€G€G€G€G€G€Gøøøøðøøøð €Ð Ð Ð Ñ ðð ð ð ð*9ð 9ð 9ð 9ð$
ð 
ð 
ð 
ð -Ð,Ñ.Ô.€Ð .Ð .Ð .Ñ .ð #?Ð">Ñ"@Ô"@Ð Ð @Ð @Ð @Ñ @ð "Ð!Ñ#Ô#€Ð #Ð #Ð #Ñ #ð$ð $ð $ð $ð ð E�G�Oð;ð ;ð ;ð ;ð ð  ð  ð  ð$ð $ð $ð $ð $�vñ $ô $ð $ðLð ð ð ð ð ð
ð ð ð ð ð s   Ÿ4A ÁA%ÁA Á A%