+
    :ig2                     T   R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt R t]! 4       tRtRR ltRR	 lt ! R
 R]4      tR tR t]]3t]3R lt ! R R]4      t ! R R]4      t ! R R]4      tRR ltR tRP=                  4       tR t ]!R8X  d
   ] ! 4        R# R# )z
This file contains `__main__` so that it can be run as a commandline tool.

This file contains functions to inspect Numba's support for a given Python
module or a Python package.
N)errors)get_versions)
cpu_target)captured_stdoutc                      \        4       R ,          p V '       g)   \        P                  ! R\        P                  R7       R# V # )zfull-revisionidz>Cannot find git commit hash. Source links could be inaccurate.)categorymain)r   warningswarnr   NumbaWarning)fulls    W/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/misc/help/inspector.py_get_commitr      s4    >+,DL((	
 K    zLhttps://github.com/numba/numba/blob/{commit}/{path}#L{firstline}-L{lastline}c                   T;'       g    \         pVP                  pVP                  4        VP                  P                  4        / p/ p VP	                  V 4      pVP                  V4      pVP                   F  p VP                  4       WG&   K  	  WSR&   WcR&   WCR&   V#   \         d	    RYG&    K:  i ; i  \         d    RpRp L5i ; i)ag  Return information about the support of a function.

Returns
-------
info : dict
    Defined keys:
    - "numba_type": str or None
        The numba type object of the function if supported.
    - "explained": str
        A textual description of the support.
    - "source_infos": dict
        A dictionary containing the source location of each definition.
Nznot supported
numba_type	explainedsource_infos)
r   typing_contextrefreshtarget_contextresolve_value_typeexplain_function_type	templatesget_source_infoAttributeError
ValueError)functiontargettyctinfor   nbtyr   temps   &&      r   inspect_functionr#   "   s     !!zF  DLLN
!!#DL*&&x0 ..t4	NND*%)%9%9%;" # !'K " *%)"*  $#	$s$   B8 >B""B54B58C
	C
c              #    "   Vf   / MTp\        V 4       F  pVP                  R4      '       d   K  \        W4      p\        P                  \        P
                  3p\        WE4      '       g   KZ  \        WVR7      pWB9   d   W$,          VR&   MRP                  V P                  VR7      W$&   VP                  \        WAR7      4       Vx  K  	  R# 5i)zoInspect a module object and yielding results from `inspect_function()`
for each function object in the module.
N_)modulenameobjaliasz{module}.{name})r&   r'   )r   )dir
startswithgetattrpytypesFunctionTypeBuiltinFunctionType
isinstancedictformat__name__updater#   )r&   r   r)   r'   r(   supported_typesr    s   &&&    r   inspect_moduler6   M   s      -BUEF??3f#"//1L1LM#//6#6<!JDM*117; 2 =EJ$S89
% s   CCc                   V   a  ] tR t^ht o RtR t]R 4       t]R 4       tR t	R t
RtV tR# )	_Statz9For gathering simple statistic of (un)supported functionsc                "    ^ V n         ^ V n        R#     N	supportedunsupportedselfs   &r   __init___Stat.__init__j   s    r   c                @    V P                   V P                  ,           pV# Nr<   )r@   totals   & r   rE   _Stat.totaln   s    !1!11r   c                N    V P                   V P                  ,          ^d,          pV# )d   )r=   rE   )r@   ratios   & r   rI   _Stat.ratios   s    +c1r   c                    V P                   ^ 8X  d   R# RP                  V P                  V P                   V P                  R7      # )r;   emptyz0supported = {supported} / {total} = {ratio:.2f}%)r=   rE   rI   )rE   r2   r=   rI   r?   s   &r   describe_Stat.describex   s>    ::?AHHnn**** I 
 	
r   c                l    R P                  V P                  P                  V P                  4       R7      # )z{clsname}({describe}))clsnamerM   )r2   	__class__r3   rM   r?   s   &r   __repr___Stat.__repr__   s0    &--NN++]]_ . 
 	
r   r<   N)r3   
__module____qualname____firstlineno____doc__rA   propertyrE   rI   rM   rR   __static_attributes____classdictcell____classdict__s   @r   r8   r8   h   sD     C    

 
r   r8   c                     \         ;QJ d&    R  V  4       F  '       g   K   R'       * # 	  R'       * # ! R  V  4       4      '       * # )c              3   B   "   T F  qP                  R 4      x  K  	  R# 5i)r%   N)r+   .0xs   & r   	<genexpr>(filter_private_module.<locals>.<genexpr>   s     @.?<<$$.?s   TFanymodule_componentss   &r   filter_private_modulerh      s6    s@.?@ss@@s@@s@.?@@@@r   c                     \         ;QJ d&    R  V  4       F  '       g   K   R'       * # 	  R'       * # ! R  V  4       4      '       * # )c              3   *   "   T F	  qR 8H  x  K  	  R# 5i)testsN r_   s   & r   rb   &filter_tests_module.<locals>.<genexpr>   s     ;):A<):s   TFrd   rf   s   &r   filter_tests_modulern      s6    s;):;ss;;s;;s;):;;;;r   c              #    a"   R pV P                   R,           p\        P                  ! V P                  VVR7      pV3R lpV P                   pV! V4      '       g   V x  V F  pV^,          pV! V4      '       d   K  \	        4       ;_uu_ 4         \        V4      pTP                  R4      R,           F  p	 \        Y4      pK  	  RRR4       \        X\        P                  4      '       g   K  Tx  K  	  R#   \         d     RRR4       K  i ; i  \         d    Rp  K_  i ; i  + '       g   i     Lk; i5i)zKYield all modules in a given package.

Recursively walks the package tree.
c                     R # rD   rl   )r%   s   &r   <lambda>)list_modules_in_package.<locals>.<lambda>   s    tr   .)onerrorc                    <a V P                  R 4      o\        ;QJ d    V3R lS 4       F  '       g   K   R# 	  R# ! V3R lS 4       4      # )rs   c              3   >   <"   T F  pV! S4      '       * x  K  	  R # 5irD   rl   )r`   	filter_fnrg   s   & r   rb   @list_modules_in_package.<locals>.check_filter.<locals>.<genexpr>   s$      4$2y !!2333$2s   TF)splitre   )modnamerg   module_filterss   &@r   check_filter-list_modules_in_package.<locals>.check_filter   sM    #MM#.s 4$24ss 	4s 	4s 4$24 4 	4r   N:   NN)r3   pkgutilwalk_packages__path__r   
__import__	Exceptionry   r,   r   r0   r-   
ModuleType)
packager{   onerror_ignoreprefixpackage_walkerr|   rz   pkginfomodparts
   &f        r   list_modules_in_packager      s!    
 $N#F**N4
 G  !!*   )
  c*2..!#,C / " #w1122	5 "    & C sl   BD?D,C=D,:DD,	4D?=D	D,	
D?D	D,D)$D,(D))D,,D<7D?c                   0   a  ] tR t^t o RtR tR tRtV tR# )	FormatterzBase class for formatters.
    c                    Wn         R # rD   _fileobj)r@   fileobjs   &&r   rA   Formatter.__init__   s    r   c                T    VP                  R V P                  4       \        V/ VB  R# )fileN)
setdefaultr   print)r@   argskwargss   &*,r   r   Formatter.print   s#    &$--0tvr   r   N)	r3   rT   rU   rV   rW   rA   r   rY   rZ   r[   s   @r   r   r      s       r   r   c                   N   a  ] tR t^t o RtR tR tR tR tR t	R t
R tR	tV tR
# )HTMLFormatterz Formatter that outputs HTML
    c                ,    ^ RI pVP                  V4      # r:   )htmlescape)r@   textr   s   && r   r   HTMLFormatter.escape   s    {{4  r   c                ,    V P                  R VR4       R# )z<h1></h2>Nr   r@   r   s   &&r   titleHTMLFormatter.title   s    

64)r   c                N    V P                  R VR4       V P                  R4       R# )z<h2>r   <ul>Nr   r@   rz   s   &&r   begin_module_section"HTMLFormatter.begin_module_section   s    

67G,

6r   c                (    V P                  R 4       R# )</ul>Nr   r?   s   &r   end_module_section HTMLFormatter.end_module_section   s    

7r   c                   V P                  R 4       V P                  RP                  VV4      4       V P                  RP                  V4      4       V P                  RVR4       V P                  R4       VP                  4        EF,  w  rxV'       d   V P                  R 4       VR,          p	VR,          p
VR,          pVR	,          pV P                  R
P                  V P                  V	4      V P                  V
4      V P                  V4      V^ ,          V^,          4      4       T P                  RP                  T P                  VR,          ;'       g    R4      4      4       M8V P                  RP                  V P                  \	        V4      4      4      4       V P                  R4       EK/  	  V P                  R4       V P                  R4       R# )<li>z{}.<b>{}</b>z: <b>{}</b>z
<div><pre>z</pre></div>r   r'   sigfilenamelinesz)<p>defined by <b>{}</b>{} at {}:{}-{}</p>	<p>{}</p>	docstring z<li>{}</li>r   N)r   r2   itemsr   str)r@   rz   itemnametypenamer   sourcesr)   tclssourceimplr   r   r   s   &&&&&&&      r   write_supported_item"HTMLFormatter.write_supported_item   so   

6

>((
 	 	

=''12

<N;

6#MMOLD

6"f~Um!*-w

?FFD)4;;s+;H-uQxq 

;--KK{ 3 9 9r:  

8??4;;s4y+ABCJJw% ,& 	

7

7r   c                    V P                  R 4       V P                  RP                  VV4      4       V P                  R4       R# )r   z{}.<b>{}</b>: UNSUPPORTEDr   N)r   r2   r@   rz   r   s   &&&r   write_unsupported_item$HTMLFormatter.write_unsupported_item  s<    

6

.55
 	 	

7r   c                b    V P                  R P                  VP                  4       4      4       R# )r   N)r   r2   rM   )r@   statss   &&r   write_statisticHTMLFormatter.write_statistic  s     

;%%enn&678r   rl   Nr3   rT   rU   rV   rW   r   r   r   r   r   r   r   rY   rZ   r[   s   @r   r   r      s3     !*B9 9r   r   c                   N   a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
tV tR# )ReSTFormatteri  zDFormatter that output ReSTructured text format for Sphinx docs.
    c                    V# rD   rl   r   s   &&r   r   ReSTFormatter.escape  s    r   c                    V P                  V4       V P                  R \        V4      ,          4       V P                  4        R# )=Nr   lenr   s   &&r   r   ReSTFormatter.title  s+    

4

3T?#

r   c                    V P                  V4       V P                  R \        V4      ,          4       V P                  4        R# )-Nr   r   s   &&r   r   "ReSTFormatter.begin_module_section  s,    

7

3W%&

r   c                &    V P                  4        R # rD   r   r?   s   &r   r    ReSTFormatter.end_module_section$  s    

r   c                   V P                  R P                  W4      4       V P                  R4       V P                  4        V'       d!   V P                  RP                  V4      4       V P                  4        VP                  4        F  w  rxV'       d   VR,          p	VR,          p
VR,          pVR,          p\        P                  \        VV^ ,          V^,          R7      pV P                  RP                  WW^ ,          V^,          V4      4       K  V P                  R	P                  \        V4      4      4       K  	  V P                  4        R
# )z.. function:: {}.{}z   :noindex:z   Alias to: ``{}``r'   r   r   r   )commitpath	firstlinelastlinez,   - defined by ``{}{}`` at `{}:{}-{} <{}>`_z   - defined by ``{}``N)r   r2   r   
github_urlr   r   )r@   rz   r   r   r   r   r)   r   r   r   r   r   r   source_links   &&&&&&&       r   r   "ReSTFormatter.write_supported_item'  s   

(//BC

>"

JJ,33E:;

#MMOLDf~Um!*-w(//!!#Ah"1X	 0  

BII81XuQx 

3::3t9EF' ,( 	

r   c                    R # rD   rl   r   s   &&&r   r   $ReSTFormatter.write_unsupported_itemG  s    r   c                "   VP                   ^ 8X  d   V P                  R4       M[RpV P                  VP                  VP                  4      4       V P                  4        V P                  VP	                  4       4       V P                  4        R# )r;   zThis module is not supported.z%Not showing {} unsupported functions.N)r=   r   r2   r>   rM   )r@   statmsgs   && r   r   ReSTFormatter.write_statisticJ  s_    >>QJJ679CJJszz$"2"234JJLJJt}}'

r   rl   Nr   r[   s   @r   r   r     s3     

@ r   r   c                p   V P                  RP                  V4      4       / pV EF  p\        4       pVP                  pV P	                  V P                  V4      4       \        WSVR7       EF  pVR,          p	V	e   V;P                  ^,          un        V P                  V P                  VR,          P                  4      V P                  VR,          4      V P                  \        V	4      4      V P                  VR,          4      VR,          VP                  R	4      R
7       K  V;P                  ^,          un        V P                  V P                  VR,          P                  4      V P                  VR,          4      R7       EK"  	  V P                  V4       V P                  4        EK  	  R# )zFormat modules.
    zListings for {})r   r)   r   Nr&   r'   r   r   r)   )rz   r   r   r   r   r)   )rz   r   )r   r2   r8   r3   r   r   r6   r=   r   r   getr>   r   r   r   )
	formatterpackage_namemod_sequencer   	alias_mapr   r   rz   r    nbtypes
   &&&&      r   _format_module_infosr   U  si    OO%,,\:;Iw,,&&y'7'7'@A"3YGGD,'F!!#..%,,T(^-D-DE&--d6l;&--c&k:'..tK/@A 0((7+ /    A% 00%,,T(^-D-DE&--d6l; 1  H( 	!!$'$$&3 r   c                   \        V 4      p\        VR4      '       d   \        V4      pMV.pVR8X  d?   \        VR,           R4      ;_uu_ 4       p\	        VR7      p\        W`V4       RRR4       R# VR8X  d?   \        VR,           R4      ;_uu_ 4       p\        VR7      p\        W`V4       RRR4       R# \        R	P                  V4      4      h  + '       g   i     R# ; i  + '       g   i     R# ; i)
zWrite listing information into a file.

Parameters
----------
package_name : str
    Name of the package to inspect.
filename : str
    Output filename. Always overwrite.
output_format : str
    Support formats are "html" and "rst".
r   r   z.htmlw)r   Nrstz.rstz#Output format '{}' is not supported)	r   hasattrr   openr   r   r   r   r2   )r   r   output_formatr   modsfoutfmtrs   &&&    r   write_listingsr   v  s     &Gw
##&w/y(W$c**d .D T: +* 
%	(V#S))T .D T: *) 188GI 	I +** *))s   CC%C"	%C6	z6
Inspect Numba support for a given top-level package.
c                  B   \         P                  ! \        R 7      p V P                  RR\        RR7       V P                  RRRRR7       V P                  R	R
RRR7       V P                  4       pVP                  pVP                  pVP                  p\        W$V4       R# ))descriptionr   zPackage to inspect)metavartypehelpz--formatr2   r   z!Output format; i.e. "html", "rst")destdefaultr   z--filer   inspector_outputz8Output filename. Defaults to "inspector_output.<format>"N)
argparseArgumentParserprogram_descriptionadd_argumentr   
parse_argsr   r2   r   r   )parserr   r   r   r   s        r   r   r     s    $$1DEF
93!   60   v'9G  
 D<<LKKMyyH<=9r   __main__rD   )NN)"rW   r  r   r	   typesr-   
numba.corer   numba._versionr   numba.core.registryr   numba.tests.supportr   r   r   r   r#   r6   objectr8   rh   rn   _default_module_filtersr   r   r   r   r   r   stripr  r   r3   rl   r   r   <module>r     s         ' * / 
[
(V6
F 
@A<
   5L 1h <9I <9~>I >B'BI>	EG 
:, zF r   