ó
    Ð]j�~  ã                   ó  • S r SSKrSSKJr  SSKrSSKJr  SSKJr  SSK	J
r
  SSK	Jr  SSK	Jr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  SSKJrJr  SSKJr  SSKJr  SSKJrJr  SSKJ r   SSKJ!r!  SSK"J#r#J$r$  SSK%J&r&  SSK%J'r'  SSK(J)r)  SSK*J+r+  SSK,J-r-  SSK.J/r/  SSK0J1r1  SSK2J3r3  SSK4J5r5  SSK6J7r7  SSK8J9r9J:r:  SS K;J<r<  SS!K=J>r>  \R~                  " S"5         " S# S$5      r@ " S% S&\@5      rAS' rB\
R†                  S(S(S(4S) jrDg)*aQ  
The API basically only provides one class. You can create a :class:`Script` and
use its methods.

Additionally you can add a debug function with :func:`set_debug_function`.
Alternatively, if you don't need a custom function and are happy with printing
debug messages to stdout, simply call :func:`set_debug_function` without
arguments.
é    N)ÚPath)Útree)Úget_executable_nodes)Údebug)Úsettings)Úcache)ÚKnownContentFileIO)Úclasses)Úinterpreter)Úhelpers)Úvalidate_line_column)Ú
CompletionÚsearch_in_module)ÚKeywordName)ÚInterpreterEnvironment)Úget_default_projectÚProject)Úparso_to_jedi_errors)Úrefactoring)Úextract_functionÚextract_variable)ÚInferenceState)Úimports)Úfind_references)Útry_iter_content)Úinfer_call_of_leaf)Útransform_path_to_dotted)Útree_name_to_values)ÚModuleValue)ÚValueSet)Úunpack_tuple_to_dict)Úconvert_namesÚconvert_values)Úload_proper_stub_module)Úto_listi¸  c                   ó–  • \ rS rSrSrS"SSSS.S jjr\R                  S 5       rS r	S r
\S#S	S
.S jj5       r\S#S	S	S.S jj5       r\S#S	S	S	S	S.S jj5       rS	S.S jr\S$S j5       rS r\S#S j5       r\S#S j5       r\S#S j5       r\S#S j5       rS rS rS rS%S jrS#S jr\SSS.S j5       r\SSS.S j5       rS#S  jrS!rg)&ÚScripté3   a¯	  
A Script is the base for completions, goto or whatever you want to do with
Jedi. The counter part of this class is :class:`Interpreter`, which works
with actual dictionaries and can work with a REPL. This class
should be used when a user edits code in an editor.

You can either use the ``code`` parameter or ``path`` to read a file.
Usually you're going to want to use both of them (in an editor).

The Script's ``sys.path`` is very customizable:

- If `project` is provided with a ``sys_path``, that is going to be used.
- If `environment` is provided, its ``sys.path`` will be used
  (see :func:`Environment.get_sys_path <jedi.api.environment.Environment.get_sys_path>`);
- Otherwise ``sys.path`` will match that of the default environment of
  Jedi, which typically matches the sys path that was used at the time
  when Jedi was imported.

Most methods have a ``line`` and a ``column`` parameter. Lines in Jedi are
always 1-based and columns are always zero based. To avoid repetition they
are not always documented. You can omit both line and column. Jedi will
then just do whatever action you are calling at the end of the file. If you
provide only the line, just will complete at the end of that line.

.. warning:: By default :attr:`jedi.settings.fast_parser` is enabled, which means
    that parso reuses modules (i.e. they are not immutable). With this setting
    Jedi is **not thread safe** and it is also not safe to use multiple
    :class:`.Script` instances and its definitions at the same time.

    If you are a normal plugin developer this should not be an issue. It is
    an issue for people that do more complex stuff with Jedi.

    This is purely a performance optimization and works pretty well for all
    typical usages, however consider to turn the setting off if it causes
    you problems. See also
    `this discussion <https://github.com/davidhalter/jedi/issues/1240>`_.

:param code: The source code of the current file, separated by newlines.
:type code: str
:param path: The path of the file in the file system, or ``''`` if
    it hasn't been saved yet.
:type path: str or pathlib.Path or None
:param Environment environment: Provide a predefined :ref:`Environment <environments>`
    to work with a specific Python version or virtualenv.
:param Project project: Provide a :class:`.Project` to make sure finding
    references works well, because the right folder is searched. There are
    also ways to modify the sys path and other things.
N)ÚpathÚenvironmentÚprojectc          	      ó`  • X l         [        U[        5      (       a  [        U5      nU(       a  UR	                  5       OS U l        Uc3  Uc  [        S5      e[        US5       nUR                  5       nS S S 5        Uc.  [        U R
                  c  S OU R
                  R                  5      n[        XCU R
                  S9U l        [        R                  " S5        U R                  R                  UU R
                  U=(       a    UR                   S:H  S["        R$                  ["        R&                  S9u  U l        n[        R                  " S5        [*        R,                  " US	S
9U l        Xl        [2        R4                  " 5         [        R6                  " 5         g ! , (       d  f       GN2= f)Nz)Must provide at least one of code or pathÚrb)r*   Úscript_pathÚinitú.pyiF)Úcoder)   Úuse_latest_grammarr   Ú
diff_cacheÚ
cache_pathÚparsedT)Úkeepends)Ú
_orig_pathÚ
isinstanceÚstrr   Úabsoluter)   Ú
ValueErrorÚopenÚreadr   Úparentr   Ú_inference_stater   ÚspeedÚparse_and_get_codeÚsuffixr   Úfast_parserÚcache_directoryÚ_module_nodeÚparsoÚsplit_linesÚ_code_linesÚ_coder   Úclear_time_cachesÚ
reset_time)Úselfr1   r)   r*   r+   Úfs         ÚN/home/mande/repo/quber/.venv/lib/python3.13/site-packages/jedi/api/__init__.pyÚ__init__ÚScript.__init__d   sI  € ØŒÜ�dœC× Ñ Ü˜“:ˆDæ'+�D—M‘M”O°ˆŒ	à‰<Ø‰|Ü Ð!LÓMÐMô �d˜DÔ! QØ—v‘v“x�÷ "ð ‰?ä)°$·)±)Ñ2C©$ÈÏÉ×IYÑIYÓZˆGä .Ø¸$¿)¹)ñ!
ˆÔô 	�Š�FÔØ"&×"7Ñ"7×"JÑ"JØØ—‘Ø#×=¨¯©°vÑ(=ØÜ×+Ñ+Ü×/Ñ/ð #Kð #
ÑˆÔ˜4ô 	�Š�HÔÜ ×,Ò,¨T¸DÑAˆÔØŒ
ä×ÒÔ!Ü×ÒÕ÷1 "Ö!ús   Á"FÆ
F-c           	      óŽ  • S nSnU R                   b6  [        U R                  R                  SS9U R                   5      u  p4Ub  UnUnU R                   c  S nO [	        U R                   U R
                  5      nU R                   bV  U R                   R                  S:X  a<  [        U R                  U R                  R                  UUU R                  5      nUb  U$ Uc  Sn[        U R                  U R                  UUU R                  US9nUS   S;  a0  U R                  R                  R                  U[        U/5      5        U$ )NF)Úadd_parent_pathsr0   ©Ú__main__)Úfile_ioÚstring_namesÚ
code_linesÚ
is_packager   )ÚbuiltinsÚtyping)r)   r   r?   Úget_sys_pathr	   rI   rB   r$   Úlatest_grammarrE   r   rH   Úmodule_cacheÚaddr    )rL   ÚnamesrX   Úimport_namesÚis_prU   Ústub_moduleÚmodules           rN   Ú_get_moduleÚScript._get_moduleŒ   s>  € àˆØˆ
Ø�9‰9Ñ Ü!9Ø×%Ñ%×2Ñ2ÀEÐ2ÐJØ—	‘	ó"ÑˆLð Ñ'Ø$�Ø!�
à�9‰9ÑØ‰Gä(¨¯©°D·J±JÓ?ˆGØ�9‰9Ñ  T§Y¡Y×%5Ñ%5¸Ó%?ä1Ø×%Ñ%Ø×%Ñ%×4Ñ4ØØØ×!Ñ!óˆKð Ñ&Ø"Ð"à‰=Ø!ˆEäØ×!Ñ! 4×#4Ñ#4ØØØ×'Ñ'Ø!ñ
ˆð �‰8Ð1Ó1à×!Ñ!×.Ñ.×2Ñ2°5¼(ÀFÀ8Ó:LÔMØˆó    c                 ó>   • U R                  5       R                  5       $ ©N)rd   Ú
as_context©rL   s    rN   Ú_get_module_contextÚScript._get_module_context¸   s   € Ø×ÑÓ!×,Ñ,Ó.Ð.rf   c                 ó–   • SU R                   R                  < S[        U R                  5      < SU R                  R
                  < S3$ )NÚ<z: Ú Ú>)Ú	__class__Ú__name__Úreprr7   r?   r*   rj   s    rN   Ú__repr__ÚScript.__repr__»   s4   � à�N‰N×#Ô#Ü�—‘Ö!Ø×!Ñ!×-Ô-ð
ð 	
rf   F©Úfuzzyc          
      ó.  • U R                   R                  5         [        R                  " S5         [	        U R                   U R                  5       U R                  X4U R                  US9nUR                  5       sSSS5        $ ! , (       d  f       g= f)aÛ  
Completes objects under the cursor.

Those objects contain information about the completions, more than just
names.

:param fuzzy: Default False. Will return fuzzy completions, which means
    that e.g. ``ooa`` will match ``foobar``.
:return: Completion objects, sorted by name. Normal names appear
    before "private" names that start with ``_`` and those appear
    before magic methods and name mangled names that start with ``__``.
:rtype: list of :class:`.Completion`
Úcompleterv   N)	r?   Úreset_recursion_limitationsr   Úincrease_indent_cmr   rk   rH   Úget_signaturesry   )rL   ÚlineÚcolumnrw   Ú
completions        rN   ry   ÚScript.completeÂ   ss   € ð 	×Ñ×9Ñ9Ô;Ü×%Ò% jÕ1Ü#Ø×%Ñ% t×'?Ñ'?Ó'AÀ4×CSÑCSØ� × 3Ñ 3¸5ñˆJð ×&Ñ&Ó(÷ 2×1×1ús   ±ABÂ
B©Ú
only_stubsÚprefer_stubsc                óæ  • U R                   R                  5         X4nU R                  R                  U5      nUc�  U R                  R	                  U5      nUb  UR
                  S:X  a  / $ UR                  X4:X  aL  UR
                  S:X  a<  UR                  5       nUR                  UR                  :X  a  UR
                  S;   a  UnU R                  5       R                  U5      n[        R                  " U R                   X†5      n	[        U	UUS9n	U	 V
s/ s H.  n
[        R                  " U R                   U
R                   5      PM0     nn
[        R"                  " [%        U5      5      $ s  sn
f )a@  
Return the definitions of under the cursor. It is basically a wrapper
around Jedi's type inference.

This method follows complicated paths and returns the end, not the
first definition. The big difference between :meth:`goto` and
:meth:`infer` is that :meth:`goto` doesn't
follow imports and statements. Multiple objects may be returned,
because depending on an option you can have two different versions of a
function.

:param only_stubs: Only return stubs for this method.
:param prefer_stubs: Prefer stubs to Python objects for this method.
:rtype: list of :class:`.Name`
ÚstringÚoperator)Únumberr…   Úkeywordr�   )r?   rz   rE   Úget_name_of_positionÚget_leaf_for_positionÚtypeÚend_posÚget_next_leafÚ	start_posrk   Úcreate_contextr   Úinferr#   r
   ÚNameÚnameÚsorted_definitionsÚset)rL   r}   r~   r‚   rƒ   ÚposÚleafÚnext_ÚcontextÚvaluesÚcÚdefss               rN   r�   ÚScript.inferÙ   s8  € ð" 	×Ñ×9Ñ9Ô;ØˆlˆØ× Ñ ×5Ñ5°cÓ:ˆØ‰<Ø×$Ñ$×:Ñ:¸3Ó?ˆDØ‰|˜tŸy™y¨HÓ4Ø�	Ø�|‰| ˜~Ó-°$·)±)¸zÓ2IØ×*Ñ*Ó,�Ø—?‘? d§l¡lÓ2Ø!ŸJ™JÐ*IÓIØ �Dà×*Ñ*Ó,×;Ñ;¸DÓAˆä—’˜t×4Ñ4°gÓDˆÜØØ!Ø%ñ
ˆñ FLÓLÂVÀ”—’˜T×2Ñ2°A·F±FÖ;ÁVˆÐLô ×)Ò)¬#¨d«)Ó4Ð4ùò	 Ms   Ä5E.)Úfollow_importsÚfollow_builtin_importsr‚   rƒ   c                óª  • U R                   R                  5         U R                  R                  X45      nUc  U R	                  XXVS9$ U R                  5       R                  U5      n/ n	UR                  R                  5       (       aœ  UR                  R                  5       (       a}  UR                  R                  n
U R                  5       R                  U
5      nUR                  5       n[        U5        U H'  nUR                  UR                   5      n	U	(       d  M'    O   U	(       d  [#        UR                  5       5      n	U(       a  [$        R&                  " X”5      n	[)        U	UUS9n	[+        U	5       Vs/ s H$  n[,        R.                  " U R                   U5      PM&     nn[#        [+        [$        R0                  " U5      5      5      $ s  snf )a&  
Goes to the name that defined the object under the cursor. Optionally
you can follow imports.
Multiple objects may be returned, depending on an if you can have two
different versions of a function.

:param follow_imports: The method will follow imports.
:param follow_builtin_imports: If ``follow_imports`` is True will try
    to look up names in builtins (i.e. compiled or extension modules).
:param only_stubs: Only return stubs for this method.
:param prefer_stubs: Prefer stubs to Python objects for this method.
:rtype: list of :class:`.Name`
r�   )r?   rz   rE   r‰   r�   rk   Úcreate_nameÚ	tree_nameÚis_definitionÚparent_contextÚis_classÚ	tree_nodeÚcreate_valueÚ	py__mro__ÚnextÚgotoÚvalueÚlistr   Úfilter_follow_importsr"   r”   r
   r‘   r“   )rL   r}   r~   r�   rž   r‚   rƒ   r¡   r’   r_   Ú
class_nodeÚclass_valueÚmroÚclsÚdr›   s                   rN   r©   ÚScript.goto  s|  € ð  	×Ñ×9Ñ9Ô;Ø×%Ñ%×:Ñ:¸D¸>ÓJˆ	ØÑð —:‘:˜d°z�:Ð]Ð]Ø×'Ñ'Ó)×5Ñ5°iÓ@ˆð ˆØ�>‰>×'Ñ'×)Ñ)¨d×.AÑ.A×.JÑ.J×.LÑ.LØ×,Ñ,×6Ñ6ˆJØ×2Ñ2Ó4×AÑAÀ*ÓMˆKØ×'Ñ'Ó)ˆCÜ�ŒIÛ�ØŸ™ §¡Ó1�ß�5Ùñ ö
 Ü˜Ÿ™›Ó%ˆEæÜ×1Ò1°%ÓPˆEÜØØ!Ø%ñ
ˆô ADÀEÄ
ÓKÂ
¸1”—’˜T×2Ñ2°AÖ6Á
ˆÐKä”Cœ×2Ò2°4Ó8Ó9Ó:Ð:ùò Ls   Å;+G©Ú
all_scopesc                ó    • U R                  XS9$ )aC  
Searches a name in the current file. For a description of how the
search string should look like, please have a look at
:meth:`.Project.search`.

:param bool all_scopes: Default False; searches not only for
    definitions on the top level of a module level, but also in
    functions and classes.
:yields: :class:`.Name`
r³   ©Ú_search_func)rL   r…   r´   s      rN   ÚsearchÚScript.search:  s   € ð × Ñ  Ð Ð?Ð?rf   c           
      óž   • U R                  US9n[        R                  " U5      u  pg[        U R                  U R                  5       UUUUUS9$ )Nr³   )r_   Úwanted_typeÚwanted_namesry   rw   )Ú_namesr   Úsplit_search_stringr   r?   rk   )rL   r…   r´   ry   rw   r_   r»   r¼   s           rN   r·   ÚScript._search_funcG  sV   € à—‘ z�Ð2ˆÜ$+×$?Ò$?ÀÓ$GÑ!ˆÜØ×!Ñ!Ø×$Ñ$Ó&ØØ#Ø%ØØñ
ð 	
rf   c                 ó,   • U R                   " U4SS0UD6$ )aÂ  
Like :meth:`.Script.search`, but completes that string. If you want to
have all possible definitions in a file you can also provide an empty
string.

:param bool all_scopes: Default False; searches not only for
    definitions on the top level of a module level, but also in
    functions and classes.
:param fuzzy: Default False. Will return fuzzy completions, which means
    that e.g. ``ooa`` will match ``foobar``.
:yields: :class:`.Completion`
ry   Tr¶   )rL   r…   Úkwargss      rN   Úcomplete_searchÚScript.complete_searchU  s   € ð × Ò  ÑA°$ÐA¸&ÑAÐArf   c                 ó  ^ ^• T R                   R                  5         T R                  XSS9nU(       a  U$ T R                  R	                  X45      mTbP  TR
                  X4:X  a?  TR                  S:X  a/  TR                  5       nUb  UR                  TR
                  :X  a  UmTbe  TR                  S;   aU  UU 4S jnU" 5       (       aB  [        T R                   TR                  5      n[        R                  " T R                   U5      /$ / $ )aâ  
Used to display a help window to users.  Uses :meth:`.Script.goto` and
returns additional definitions for keywords and operators.

Typically you will want to display :meth:`.BaseName.docstring` to the
user for all the returned definitions.

The additional definitions are ``Name(...).type == 'keyword'``.
These definitions do not have a lot of value apart from their docstring
attribute, which contains the output of Python's :func:`help` function.

:rtype: list of :class:`.Name`
T)r�   Únewline)rˆ   r†   Ú
error_leafc                  ó"  >• TR                   S;   a6  TR                  R                  S:X  a  gTR                  R                  S:X  a  gTR                  R                  n U R
                  R                  R                  5       nTR                   U;   $ )N)Ú(Ú)Ú[Ú]ÚtrailerFÚatom)rª   r>   r‹   r?   ÚgrammarÚ_pgen_grammarÚreserved_syntax_stringsÚkeys)rÎ   Úreservedr–   rL   s     €€rN   Ú
need_pydocÚScript.help.<locals>.need_pydoc  sv   ø€ Ø—:‘:Ð!5Ó5Ø—{‘{×'Ñ'¨9Ó4Ø$Ø—{‘{×'Ñ'¨6Ó1Ø$Ø×/Ñ/×7Ñ7�ð #×0Ñ0×HÑH×MÑMÓO�Ø—z‘z XÑ-Ð-rf   )r?   rz   r©   rE   rŠ   rŒ   r‹   r�   rŽ   r   rª   r
   r‘   )rL   r}   r~   Údefinitionsr—   rÓ   r’   r–   s   `      @rN   ÚhelpÚScript.helpd  sæ   ù€ ð 	×Ñ×9Ñ9Ô;Ø—i‘i ¸T�iÐBˆÞØÐØ× Ñ ×6Ñ6¸°~ÓFˆàÑ §¡°°Ó >À4Ç9Á9ÐPYÓCYØ×&Ñ&Ó(ˆEØÑ  U§_¡_¸¿¹Ó%DØ�àÑ §	¡	Ð-RÓ Rö
.ñ �|‰|Ü" 4×#8Ñ#8¸$¿*¹*ÓE�ÜŸš T×%:Ñ%:¸DÓAÐBÐBØˆ	rf   c                 ó`   ^ ^^• T R                   R                  5         SUUU 4S jjnU" S0 UD6$ )a¯  
Lists all references of a variable in a project. Since this can be
quite hard to do for Jedi, if it is too complicated, Jedi will stop
searching.

:param include_builtins: Default ``True``. If ``False``, checks if a definition
    is a builtin (e.g. ``sys``) and in that case does not return it.
:param scope: Default ``'project'``. If ``'file'``, include references in
    the current module only.
:rtype: list of :class:`.Name`
c                 ó°  >• US;  a  [        S5      eT	R                  R                  TT45      nUc  / $ [        T	R	                  5       X!S:H  5      nU Vs/ s H$  n[
        R                  " T	R                  U5      PM&     nnU (       a  US:X  a(  U Vs/ s H  ofR                  5       (       a  M  UPM     nn[        R                  " U5      $ s  snf s  snf )N)r+   Úfilez0Only the scopes "file" and "project" are allowedrÚ   )r;   rE   r‰   r   rk   r
   r‘   r?   Úin_builtin_moduler   r“   )
Úinclude_builtinsÚscoper¡   r_   ÚnrÕ   r±   r~   r}   rL   s
          €€€rN   Ú_referencesÚ*Script.get_references.<locals>._referencesŸ  s¼   ø€ ØÐ/Ó/Ü Ð!SÓTÐTØ×)Ñ)×>Ñ>ÀÀf¸~ÓNˆIØÑ à�	ä# D×$<Ñ$<Ó$>À	ÐTZÉ?Ó[ˆEáKPÓQÊ5Àaœ7Ÿ<š<¨×(=Ñ(=¸qÖAÉ5ˆKÐQÞ# u°£Ù*5ÓSª+ Q×=PÑ=P×=RŸq©+�ÐSÜ×-Ò-¨kÓ:Ð:ùò RùâSs   Á+CÂCÂ0C)Tr+   © )r?   rz   )rL   r}   r~   rÁ   rß   s   ```  rN   Úget_referencesÚScript.get_references�  s1   ú€ ð 	×Ñ×9Ñ9Ô;÷	;ñ 	;ñ Ñ$˜VÑ$Ð$rf   c                 ó   • U R                   R                  5         X4n[        R                  " U R                  U5      nUc  / $ U R                  5       R                  UR                  5      n[        R                  " U R                   UUR                  U R                  U5      n[        R                  " S5        UR                  5        Vs/ s H$  n[        R                  " U R                   Xt5      PM&     sn$ s  snf )a  
Return the function object of the call under the cursor.

E.g. if the cursor is here::

    abs(# <-- cursor is here

This would return the ``abs`` function. On the other hand::

    abs()# <-- cursor is here

This would return an empty list..

:rtype: list of :class:`.Signature`
zfunc_call followed)r?   rz   r   Úget_signature_detailsrE   rk   r�   Úbracket_leafÚcache_signaturesrH   r   r@   r|   r
   Ú	Signature)rL   r}   r~   r•   Úcall_detailsr˜   rÕ   Ú	signatures           rN   r|   ÚScript.get_signatures¯  sâ   € ð" 	×Ñ×9Ñ9Ô;ØˆlˆÜ×4Ò4°T×5FÑ5FÈÓLˆØÑØˆIà×*Ñ*Ó,×;Ñ;¸L×<UÑ<UÓVˆÜ×.Ò.Ø×!Ñ!ØØ×%Ñ%Ø×ÑØó
ˆô 	�ŠÐ(Ô)ð
 "-×!;Ñ!;Ô!=ó?Ú!=�Iô ×!Ò! $×"7Ñ"7¸ÖQÙ!=ñ?ð 	?ùò ?s   Ã+C;c                 óD  • X4nU R                   R                  USS9nUR                  U:”  d  UR                  S:X  a  UR	                  5       nUb  UnU R                  5       nUR                  SS5      nUbQ  UR                  Us=:  a  UR                  S   R                  ::  a#  O  O UR                  U5      R                  5       nOUR                  U5      nUR                  c  UR                  nUR                  c  M  [        R                  " U R                  UR                  5      n	U	R                  S:w  ac  U	R                   n
U
R"                  nUb&  UR%                  5       nUR                  S   U:  a   U	$ U	R'                  5       n	U	R                  S:w  a  Mc  U	$ )	z�
Returns the scope context under the cursor. This basically means the
function, class or module where the cursor is at.

:rtype: :class:`.Name`
T)Úinclude_prefixesÚ	endmarkerÚfuncdefÚclassdeféÿÿÿÿrc   é   )rE   rŠ   rŽ   r‹   Úget_previous_leafrk   Úsearch_ancestorÚchildrenr¦   ri   r�   r’   r£   r
   r‘   r?   Ú_namer¡   Úget_definitionr>   )rL   r}   r~   r•   r–   Úprevious_leafÚmodule_contextrÞ   r˜   Ú
definitionr’   r¡   rÝ   s                rN   Úget_contextÚScript.get_contextÕ  su  € ð ˆnˆØ× Ñ ×6Ñ6°sÈTÐ6ÐRˆØ�>‰>˜CÓ 4§9¡9°Ó#;Ø ×2Ñ2Ó4ˆMØÑ(Ø$�à×1Ñ1Ó3ˆà× Ñ  ¨JÓ7ˆØ‰=˜QŸ[™[¨3ÕJ°!·*±*¸R±.×2JÑ2JÖJð
 %×1Ñ1°!Ó4×?Ñ?ÓA‰Gà$×3Ñ3°DÓ9ˆGà�l‰lÑ"Ø×,Ñ,ˆGð �l‰lÓ"ô —\’\ $×"7Ñ"7¸¿¹ÓFˆ
Ø�o‰o Ó)Ø×#Ñ#ˆDØŸ™ˆIØÑ$Ø!×0Ñ0Ó2�Ø—?‘? 1Ñ%¨Ó.ØàÐð $×*Ñ*Ó,ˆJð �o‰o Õ)ð Ðrf   c                 ó®  • SU R                   l        U R                  /U R                   l        U R	                  5       n [        U R                  5       GH}  nUR                  U5      nUR                  S;   a%  [        U R                   X2R                  S   5        GO[        U[        R                  5      (       aq  [        UR                  5       5      nUR                  5       (       a#  U[        S UR!                  5        5       5      -  nU H  n["        R$                  " X55        M     O‰UR                  S:X  a7  UR'                  U5      nUR                  S SS2    H  n[)        X6U5        M     OBUR                  S:X  a  U R                   R+                  X25      nO[-        X25      n[/        U5        U R                   R1                  5         GM€     U R                   R2                   V	s/ s H   o�R4                  U	R4                  :X  d  M  U	PM"     n
n	[7        [        U
5      S	 S
9SU R                   l        $ s  sn	f ! SU R                   l        f = f)NT)rï   rð   rò   c              3   ó*   #   • U  H	  oS    v •  M     g7f)rñ   Nrá   )Ú.0r)   s     rN   Ú	<genexpr>Ú#Script._analysis.<locals>.<genexpr>  s   é € Ð+RÒAQ¸°®HÒAQùs   ‚Ú	expr_stmtrñ   é   r’   c                 ó   • U R                   $ rh   )r}   ©Úxs    rN   Ú<lambda>Ú"Script._analysis.<locals>.<lambda>  s   € °!·&²&rf   ©ÚkeyF)r?   Úis_analysisrE   Úanalysis_modulesrk   r   r�   r‹   r   rõ   r8   r   ÚImportr”   Úget_defined_namesÚ	is_nestedÚ	get_pathsr   Úinfer_importÚ
infer_noder!   r�   r   r   rz   Úanalysisr)   Úsorted)rL   rc   Únoder˜   r`   rÞ   ÚtypesÚtestlistr›   ÚaÚanas              rN   Ú	_analysisÚScript._analysisþ  sÙ  € Ø,0ˆ×ÑÔ)Ø26×2CÑ2CÐ1Dˆ×ÑÔ.Ø×)Ñ)Ó+ˆð	6Ü,¨T×->Ñ->×?�Ø ×/Ñ/°Ó5�Ø—9‘9Ð 7Ó7ä'¨×(=Ñ(=¸wÏÉÐVWÑHXÖYÜ ¤d§k¡k×2Ñ2Ü#& t×'=Ñ'=Ó'?Ó#@�LØ—~‘~×'Ñ'Ø$¬Ñ+RÀÇÁÔAQÓ+RÓ(RÑR˜Û)˜Ü×,Ò,¨WÖ8ò *à—Y‘Y +Ó-Ø#×.Ñ.¨tÓ4�EØ$(§M¡M°%°2°a°%Ô$8˜ä,¨W¸XÖFò %9ð —y‘y FÓ*Ø#×4Ñ4×:Ñ:¸7ÓI™ä1°'Ó@˜Ü$ TÔ*Ø×%Ñ%×AÑA×Cñ- @ð0 #×3Ñ3×<Ò<ÓTÒ<˜Ç	Á	ÈQÏVÉVÑ@S—1Ñ<ˆCÐTÜœ#˜c›(Ñ(8Ñ9à05ˆD×!Ñ!Õ-ùò Uøð 16ˆD×!Ñ!Õ-ús$   ¿F/I Ç.H<ÈH<ÈI È<I ÉIc                 ó”   • U R                   " S0 UD6nU Vs/ s H$  n[        R                  " U R                  U5      PM&     sn$ s  snf )a³  
Returns names defined in the current file.

:param all_scopes: If True lists the names of all scopes instead of
    only the module namespace.
:param definitions: If True lists the names that have been defined by a
    class, function or a statement (``a = b`` returns ``a``).
:param references: If True lists all the names that are not listed by
    ``definitions=True``. E.g. ``a = b`` returns ``b``.
:rtype: list of :class:`.Name`
rá   )r½   r
   r‘   r?   )rL   rÁ   r_   rÞ   s       rN   Ú	get_namesÚScript.get_names   s>   € ð —’Ñ%˜fÑ%ˆÙ@EÓFÂ¸1”—’˜T×2Ñ2°AÖ6ÁÑFÐFùÒFs   —+Ac                 óV   • [        U R                  R                  U R                  5      $ )zU
Lists all syntax errors in the current file.

:rtype: list of :class:`.SyntaxError`
)r   r?   rÎ   rE   rj   s    rN   Úget_syntax_errorsÚScript.get_syntax_errors/  s#   € ô $ D×$9Ñ$9×$AÑ$AÀ4×CTÑCTÓUÐUrf   c                 óö   • U R                   R                  5         U R                  5       n[        R                  " U R
                  UUUS9 Vs/ s H  nUR                  U5      PM     nn[        US S9$ s  snf )N)r´   rÕ   Ú
referencesc                 ó   • U R                   $ rh   )rŽ   r  s    rN   r  ÚScript._names.<locals>.<lambda>D  s   € ¨!¯+ª+rf   r	  )r?   rz   rk   r   Úget_module_namesrE   r    r  )rL   r´   rÕ   r#  rù   r’   r›   s          rN   r½   ÚScript._names7  s…   € Ø×Ñ×9Ñ9Ô;à×1Ñ1Ó3ˆô  ×0Ò0Ø×!Ñ!Ø%Ø'Ø%ò	ó
ò�ð ×&Ñ& tÖ,ñð 	ð 
ô �dÑ 5Ñ6Ð6ùò
s   ÁA6c                ód   • U R                  XSS9n[        R                  " U R                  XC5      $ )zÎ
Renames all references of the variable under the cursor.

:param new_name: The variable under the cursor will be renamed to this
    string.
:raises: :exc:`.RefactoringError`
:rtype: :class:`.Refactoring`
F©rÜ   )râ   r   Úrenamer?   )rL   r}   r~   Únew_namerÕ   s        rN   r*  ÚScript.renameF  s2   € ð ×)Ñ)¨$ÈÐ)ÐOˆÜ×!Ò! $×"7Ñ"7¸ÓOÐOrf   )Ú
until_lineÚuntil_columnc                ó¾   • Uc  Uc  SnO&Uc  UnUc  [        U R                  US-
     5      nXE4n[        U R                  U R                  U R
                  X1U4U5      $ )aª  
Moves an expression to a new statement.

For example if you have the cursor on ``foo`` and provide a
``new_name`` called ``bar``::

    foo = 3.1
    x = int(foo + 1)

the code above will become::

    foo = 3.1
    bar = foo + 1
    x = int(bar)

:param new_name: The expression under the cursor will be renamed to
    this string.
:param int until_line: The the selection range ends at this line, when
    omitted, Jedi will be clever and try to define the range itself.
:param int until_column: The the selection range ends at this column, when
    omitted, Jedi will be clever and try to define the range itself.
:raises: :exc:`.RefactoringError`
:rtype: :class:`.Refactoring`
Nrò   )ÚlenrH   r   r?   r)   rE   ©rL   r}   r~   r+  r-  r.  Ú	until_poss          rN   r   ÚScript.extract_variableR  ss   € ð4 Ñ ,Ñ"6Ø‰IàÑ!Ø!�
ØÑ#Ü" 4×#3Ñ#3°JÀ±NÑ#CÓD�Ø"Ð0ˆIÜØ×!Ñ! 4§9¡9¨d×.?Ñ.?Ø˜V�n ió
ð 	
rf   c                óÆ   • Uc  Uc  SnO&Uc  UnUc  [        U R                  US-
     5      nXE4n[        U R                  U R                  U R                  5       X1U4U5      $ )aC  
Moves an expression to a new function.

For example if you have the cursor on ``foo`` and provide a
``new_name`` called ``bar``::

    global_var = 3

    def x():
        foo = 3.1
        x = int(foo + 1 + global_var)

the code above will become::

    global_var = 3

    def bar(foo):
        return int(foo + 1 + global_var)

    def x():
        foo = 3.1
        x = bar(foo)

:param new_name: The expression under the cursor will be replaced with
    a function with this name.
:param int until_line: The the selection range ends at this line, when
    omitted, Jedi will be clever and try to define the range itself.
:param int until_column: The the selection range ends at this column, when
    omitted, Jedi will be clever and try to define the range itself.
:raises: :exc:`.RefactoringError`
:rtype: :class:`.Refactoring`
Nrò   )r0  rH   r   r?   r)   rk   r1  s          rN   r   ÚScript.extract_functiony  sw   € ðD Ñ ,Ñ"6Ø‰IàÑ!Ø!�
ØÑ#Ü" 4×#3Ñ#3°JÀ±NÑ#CÓD�Ø"Ð0ˆIÜØ×!Ñ! 4§9¡9¨d×.FÑ.FÓ.HØ˜V�n ió
ð 	
rf   c                 ó    • U R                  XSS9 Vs/ s H  o3R                  PM     nn[        R                  " U R                  U5      $ s  snf )a9  
Inlines a variable under the cursor. This is basically the opposite of
extracting a variable. For example with the cursor on bar::

    foo = 3.1
    bar = foo + 1
    x = int(bar)

the code above will become::

    foo = 3.1
    x = int(foo + 1)

:raises: :exc:`.RefactoringError`
:rtype: :class:`.Refactoring`
Tr)  )râ   rö   r   Úinliner?   )rL   r}   r~   r±   r_   s        rN   r7  ÚScript.inline¨  sL   € ð" #'×"5Ñ"5°dÐUYÐ"5Ñ"ZÓ[Ò"Z˜Q—”Ñ"ZˆÐ[Ü×!Ò! $×"7Ñ"7¸Ó?Ð?ùò \s   “A)rI   rH   r?   rE   r7   r)   rh   )NN)FFF)FTF) rr   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rO   r   Úmemoize_methodrd   rk   rt   r   ry   r�   r©   r¸   r%   r·   rÂ   rÖ   râ   r|   rû   r  r  r   r½   r*  r   r   r7  Ú__static_attributes__rá   rf   rN   r'   r'   3   sl  † ñ/ð`$¨$¸DÈ$ö $ðP ×Ññ)ó ð)òV/ò
ð ð)¸õ )ó ð)ð, ð*5¸%Èeõ *5ó ð*5ðX ð1;¸UÐ[`Ø¨Eõ1;ó ð1;ðf ,1õ @ð ó
ó ð
òBð ó)ó ð)ðV ó%ó ð%ð< ó#?ó ð#?ðJ ó&ó ð&òP 6òDGòVô7ô
Pð ØEIÐX\ô $
ó ð$
ðL ØEIÐX\ô ,
ó ð,
÷\@rf   r'   c                   óX   ^ • \ rS rSrSrSS.U 4S jjr\R                  S 5       rSr	U =r
$ )ÚInterpreteri½  aÉ  
Jedi's API for Python REPLs.

Implements all of the methods that are present in :class:`.Script` as well.

In addition to completions that normal REPL completion does like
``str.upper``, Jedi also supports code completion based on static code
analysis. For example Jedi will complete ``str().upper``.

>>> from os.path import join
>>> namespace = locals()
>>> script = Interpreter('join("").up', [namespace])
>>> print(script.complete()[0].name)
upper

All keyword arguments are same as the arguments for :class:`.Script`.

:param str code: Code to parse.
:type namespaces: typing.List[dict]
:param namespaces: A list of namespace dictionaries such as the one
    returned by :func:`globals` and :func:`locals`.
N)r+   c                óÎ  >•  U Vs/ s H  n[        U5      PM     nnUR                  SS 5      nUc  [	        5       nO [        U[        5      (       d  [        S5      eUc  [        [        R                  " 5       5      n[        TU ](  " U4XcS.UD6  X l        [        R                  U R                  l        SU R                  l        g s  snf ! [         a    [        S5      ef = f)Nz-namespaces must be a non-empty list of dicts.r*   z?The environment needs to be an InterpreterEnvironment subclass.)r*   r+   F)ÚdictÚ	ExceptionÚ	TypeErrorÚgetr   r8   r   r   ÚcwdÚsuperrO   Ú
namespacesr   Ú#allow_unsafe_interpreter_executionsr?   Úallow_unsafe_executionsÚdo_dynamic_params_search)rL   r1   rH  r+   ÚkwdsrÞ   r*   rq   s          €rN   rO   ÚInterpreter.__init__Õ  sÕ   ø€ ð	MÙ+5Ó6ª: aœ$˜qž'©:ˆJÐ6ð —h‘h˜}¨dÓ3ˆØÑÜ0Ó2‰Kä˜kÔ+A×BÑBÜÐ aÓbÐbà‰?ÜœdŸhšh›jÓ)ˆGä‰Ò˜ÐP¨;ÑPÈ4ÒPà$Œä×8Ñ8ð 	×ÑÔ5ð :?ˆ×ÑÕ6ùò5 7øÜó 	MÜÐKÓLÐLð	Mús   ƒC ‡C	œC Ã	C ÃC$c                 óú   • U R                   c  S nO [        U R                   U R                  5      n[        U R                  U R
                  USU R                  S9n[        R                  " UU R                  5      $ )NrS   )rU   rV   rW   )
r)   r	   rI   r   r?   rE   rH   r   ÚMixedModuleContextrH  )rL   rU   Útree_module_values      rN   rk   ÚInterpreter._get_module_contextó  so   € à�9‰9ÑØ‰Gä(¨¯©°D·J±JÓ?ˆGÜ'Ø×!Ñ! 4×#4Ñ#4ØØ&Ø×'Ñ'ñ	
Ðô ×-Ò-ØØ�O‰Oó
ð 	
rf   )rH  )rr   r9  r:  r;  r<  rO   r   r=  rk   r>  Ú__classcell__)rq   s   @rN   r@  r@  ½  s1   ø† ñð. 59÷ ?ð ?ð< ×Ññ
ó ö
rf   r@  c                  óN   • U  H  n[        SU 35      R                  5         M!     g)zÜ
Preloading modules tells Jedi to load a module now, instead of lazy parsing
of modules. This can be useful for IDEs, to control which modules to load
on startup.

:param modules: different module names, list of string.
zimport N)r'   r�   )ÚmodulesÚms     rN   Úpreload_modulerV    s%   € ó ˆÜ�˜˜ˆ}Ó×#Ñ#Ö%ò rf   Tc                 ó\   • U [         l        U[         l        U[         l        U[         l        g)zË
Define a callback debug function to get all the debug messages.

If you don't specify any arguments, debug messages will be printed to stdout.

:param func_cb: The callback function for debug messages.
N)r   Údebug_functionÚenable_warningÚenable_noticeÚenable_speed)Úfunc_cbÚwarningsÚnoticesr@   s       rN   Úset_debug_functionr_    s$   € ð #„EÔØ#„EÔØ!„EÔØ„EÕrf   )Er<  ÚsysÚpathlibr   rF   Úparso.pythonr   Újedi.parser_utilsr   Újedir   r   r   Újedi.file_ior	   Újedi.apir
   r   r   Újedi.api.helpersr   Újedi.api.completionr   r   Újedi.api.keywordsr   Újedi.api.environmentr   Újedi.api.projectr   r   Újedi.api.errorsr   r   Újedi.api.refactoring.extractr   r   Újedi.inferencer   r   Újedi.inference.referencesr   Újedi.inference.argumentsr   Újedi.inference.helpersr   Újedi.inference.sys_pathr   Újedi.inference.syntax_treer   Újedi.inference.valuer   Újedi.inference.base_valuer    Újedi.inference.value.iterabler!   Ú!jedi.inference.gradual.conversionr"   r#   Újedi.inference.gradual.utilsr$   Újedi.inference.utilsr%   Úsetrecursionlimitr'   r@  rV  Úprint_to_stdoutr_  rá   rf   rN   Ú<module>r|     s¹   ðñó Ý ã Ý å 2Ý Ý Ý Ý +Ý Ý  Ý Ý 1ß <Ý )Ý 7ß 9Ý 0Ý  ß KÝ )Ý "Ý 5Ý 5Ý 5Ý <Ý :Ý ,Ý .Ý >ß KÝ @Ý (ð × Ò �dÔ ÷G
@ñ G
@ôTE
�&ô E
òP	&ð  %×4Ñ4¸tØ#¨4õrf   