Ë
    7^(h$%  ã                  óB  — U d Z ddlmZ edk(  �rddlZddlZddlZddlZddlm	Z	m
Z
mZmZ  e	e«      Z e e
e«      ddd«      Z ee«      Zej                   j#                  de«        ej$                  d¬«      Z ej(                  ed	d
«      Zej-                  ddd¬«       ej-                  ddd¬«       ej/                  e«        ej(                  edd«      Zej-                  ddd¬«       ej-                  ddd¬«       ej/                  e«       ej1                  «       \  ZZer%ej7                  de›dej8                  d   ›d�«       ej:                  dkD  rej7                  d«       ej<                  dkD  rej7                  d«       ej>                  dkD  rej7                  d«       ej@                  dkD  rej7                  d«       ej:                  dk(  e_        ej<                  dk(  e_        ej>                  dk(  e_        ej@                  dk(  e_         ej:                  sej<                  sej7                  d«       ej:                  rej<                  rej7                  d «       ej>                  rej@                  rej7                  d!«       ej>                   xr ej@                   e_!        ejD                  Z# G d"„ d#«      Z$i Z%d$e&d%<   d&„ Z'd'„ Z(g Z)d(„ Z* e+«       g dd)fd*„Z,e,e_"         e"d+«       e)j[                  «        e)D ]
  Z. e/e.«       Œ yy),zE
Import diagnostics. Run bin/diagnose_imports.py --help for details.
é    )ÚannotationsÚ__main__N)ÚabspathÚdirnameÚjoinÚnormpathz..zQUsage: %prog option [options]

Import analysis for imports between SymPy modules.)ÚusagezAnalysis optionszCOptions that define what to do. Exactly one of these must be given.z
--problemszúPrint all import problems, that is: If an import pulls in a package instead of a module (e.g. sympy.core instead of sympy.core.add); if it imports a symbol that is already present; if it imports a symbol from somewhere other than the defining module.Úcount)ÚhelpÚactionz	--originszsFor each imported symbol in each module, print the module that defined it. (This is useful for import refactoring.)zSort optionsz These options define the sort order for output lines. At most one of these options is allowed. Unsorted output will reflect the order in which imports happened.z--by-importerz.Sort output lines by name of importing module.z--by-originz-Sort output lines by name of imported module.zUnexpected arguments z (try z --help)é   z,--problems must not be given more than once.z+--origins must not be given more than once.z/--by-importer must not be given more than once.z---by-origin must not be given more than once.z4At least one of --problems and --origins is requiredz2At most one of --problems and --origins is allowedz7At most one of --by-importer and --by-origin is allowedc                  ó.   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zy)Ú
Definitionz(Information about a symbol's definition.c                ó.   — || _         || _        || _        y ©N)ÚnameÚvalueÚdefiner)Úselfr   r   r   s       úb/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sympy/testing/tests/diagnose_imports.pyÚ__init__zDefinition.__init__`   s   € ØˆDŒIØˆDŒJØ"ˆD�Ló    c                ó,   — t        | j                  «      S r   )Úhashr   ©r   s    r   Ú__hash__zDefinition.__hash__d   s   € Ü˜Ÿ	™	“?Ð"r   c                ój   — | j                   |j                   k(  xr | j                  |j                  k(  S r   )r   r   ©r   Úothers     r   Ú__eq__zDefinition.__eq__f   s'   € Ø—9‘9 §
¡
Ñ*ÒH¨t¯z©z¸U¿[¹[Ñ/HÐHr   c                ó   — | |k(   S r   © r   s     r   Ú__ne__zDefinition.__ne__h   s   € Ø ™Ð&Ð&r   c                ó`   — dt        | j                  «      ›dt        | j                  «      ›d�S )NzDefinition(z, ..., ú))Úreprr   r   r   s    r   Ú__repr__zDefinition.__repr__j   s"   � ä�T—Y‘Y•¤ d§l¡lÕ!3ð5ð 5r   N)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r    r#   r'   r"   r   r   r   r   ^   s   „ Ù6ò	#ò	#ò	Iò	'ó	5r   r   zdict[Definition, str]Úsymbol_definersc                óT   — | |k(  xs" | dk7  xr |dk7  xr | j                  |dz   «      S )z,Is a the same module as or a submodule of b?Nú.)Ú
startswith)ÚaÚbs     r   Ú	in_moduler2   q   s0   € à�A‰vÒJ˜˜d™ÒJ q¨D¡yÒJ°Q·\±\À!ÀcÁ'Ó5JÐJr   c                ó   — t        | d«      S )zgIs module relevant for import checking?

        Only imports between relevant modules will be checked.Úsympy)r2   )Úmodules    r   Úrelevantr6   u   s   € ô ˜ Ó)Ð)r   c                ór   — t         j                  rt        | |z  «       y t        j	                  | |z  «       y r   )ÚoptionsÚ
by_processÚprintÚsorted_messagesÚappend)ÚmsgÚargss     r   r=   r=   }   s)   € Ü×ÒÜ�#˜‘*Õä×"Ñ" 3¨¡:Õ.r   éÿÿÿÿc           	     ó@  — t        j                  t        j                  d«      «      }|j                  }|d   }||j                  k(  r|›dt        |j                  «      ›�}n|}t        | ||||«      }	|	j                  }
t        |«      �r‘t        |
«      �r…|	j                  j                  «       D ].  }t        ||	j                  |   |«      }|t        vsŒ&|
t        |<   Œ0 t        |	d«      r+t        j                   rt#        d| |«       nt#        d|| «       |dk7  rþ|}d|v r.|j%                  d	«      rg }n|	j                  j                  «       }|D ]Å  }||	j                  vr.t        j                   rt#        d
|
||«       Œ0t#        d||
|«       Œ?t        ||	j                  |   |«      }t        |   }||
k(  r.t        j                   rt#        d|
||«       Œ†t#        d||
|«       Œ•t        j                   rt#        d|
||||«       Œ¶t#        d||
|||«       ŒÇ |	S )aŽ  __import__ wrapper - does not change imports at all, but tracks them.

        Default order is implemented by doing output directly.
        All other orders are implemented by collecting output information into
        a sorted list that will be emitted after all imports are processed.

        Indirect imports can only occur after the requested symbol has been
        imported directly (because the indirect import would not have a module
        to pick the symbol up from).
        So this code detects indirect imports by checking whether the symbol in
        question was already imported.

        Keeps the semantics of __import__ unchanged.r   r(   z line Ú__path__z'Error: %s (a package) is imported by %sz$Error: %s contains package import %sNÚ*)z__init__.pyz__init__.pycz__init__.pyoz<Error: %s.%s is not defined (yet), but %s tries to import itz>Error: %s tries to import %s.%s, which did not define it (yet)z&Error: %s.%s is imported again into %szError: %s imports %s.%s againzAError: %s.%s is imported by %s, which should import %s.%s insteadz7Error: %s imports %s.%s but should import %s.%s instead)ÚinspectÚgetframeinfoÚsysÚ	_getframeÚfilenameÚstrÚlinenoÚbuiltin_importr(   r6   Ú__dict__Úiterkeysr   r,   Úhasattrr8   Ú	by_originr=   Úendswith)r5   ÚglobalsÚlocalsÚfromlistÚlevelÚcaller_frameÚimporter_filenameÚimporter_moduleÚimporter_referenceÚresultÚimportee_moduleÚsymbolÚ
definitionÚsymbol_listÚsymbol_definers                  r   Útracking_importr^   ƒ   sD  € ô ×+Ñ+¬C¯M©M¸!Ó,<Ó=ˆØ(×1Ñ1ÐØ! *Ñ-ˆØ × 5Ñ 5Ò5â!¤3 |×':Ñ':Ô#;ð"=Ñð "3ÐÜ ¨°¸À5ÓIˆØ Ÿ/™/ˆä�OÕ$¬°/Õ)BØ Ÿ/™/×2Ñ2Ó4ò B�Ü'Ø˜FŸO™O¨FÑ3°_óF�
à¤_Ò4Ø2A”O JÒ/ð	Bô
 �v˜zÔ*ô ×$Ò$ÜÐAØÐ 2õ4ô Ð>Ø*¨Fô4à˜4ÒØ&�Ø˜+Ñ%Ø)×2Ñ2Ð3bÔcð ')™à&,§o¡o×&>Ñ&>Ó&@˜Ø)ò k�FØ V§_¡_Ñ4Ü"×,Ò,ÜÐ ^Ø /°Ð9KõMô  Ð `Ø 2°OÀVõMô &0Ø" F§O¡O°FÑ$;¸_ó&N˜
ä)8¸Ñ)D˜Ø)¨_Ò<ä&×0Ò0Ü #Ð$LØ$3°VÐ=Oõ!Qô !$Ð$CØ&8¸/È6õ!Sô  '×0Ò0Ü #Ð$gØ&5°vÐ?QÐSaÐciõ!kô !$Ð$]Ø&8¸/È6ÐSaÐciõ!kð5kð8 ˆr   r4   )0r+   Ú
__future__r   r(   rE   rC   ÚbuiltinsÚoptparseÚos.pathr   r   r   r   Ú__file__Ú	this_fileÚ	sympy_dirÚpathÚinsertÚOptionParserÚoption_parserÚOptionGroupÚoption_groupÚ
add_optionÚadd_option_groupÚ
parse_argsr8   r>   ÚerrorÚargvÚproblemsÚoriginsÚby_importerrN   r9   Ú
__import__rJ   r   r,   Ú__annotations__r2   r6   r;   r=   rP   r^   ÚsortÚmessager:   r"   r   r   ú<module>rx      sU  ðòõ #àˆzÓãÛÛãç8Ó8Ù˜Ó!€IÙ‘W˜YÓ'¨¨t°TÓ:€IÙ˜Ó#€IØ‡H�H‡O�O�A�yÔ!à)�H×)Ñ)ðAôB€Mð
 (�8×'Ñ'ØØØMóO€Lð ×ÑØð=ð ð ô 	ð ×ÑØð7ð ð ô ð ×"Ñ" <Ô0Ø'�8×'Ñ'ØØð	LóM€Lð ×ÑØØ=Øð ô ð ×ÑØØ<Øð ô ð ×"Ñ" <Ô0Ø#×.Ñ.Ó0�O€WˆdÙØ×ÒÚ9=¸s¿x¹xÈ»{ÐKô	Mà×Ñ˜!ÒØ×ÑÐJÔKØ‡�˜ÒØ×ÑÐIÔJØ×Ñ˜QÒØ×ÑÐMÔNØ×Ñ˜1ÒØ×ÑÐKÔLØ×'Ñ'¨1Ñ,€GÔØ—o‘o¨Ñ*€G„OØ!×-Ñ-°Ñ2€GÔØ×)Ñ)¨QÑ.€GÔØ×Ò G§O¢OØ×ÑØBô	Dà×Ò˜GŸOšOØ×ÑØ@ô	Bà×Ò˜w×0Ò0Ø×ÑØEô	Gà$×0Ñ0Ð0ÒJ¸×9JÑ9JÐ5J€GÔà×(Ñ(€N÷5ñ 5ð" .0€OÐ*Ó/òKò*ð €Oò/ñ )0«	¸"ÀtÐSUó Nð` *€HÔÙˆwÔà×ÑÔØ"ò ˆÙˆg�ñð] r   