Format: application/x-python-code
⬇ Download File (2.7 KB)
   1  o
   2  
   3  �h[
   4  �@s\ddlmZmZmZmZmZddlmZdd�ZGdd�de�Z	dd�Z
   5  d	d
   6  �Zdd�Zd
   7  S)�)�
   8  CompiledValue�CompiledName�CompiledValueFilter�CompiledValueName�create_from_access_path)�LazyValueWrappercCsJ|j}|dvr|j\}t|���}nt|���}|�|�\}|��\}|S)N)�None�True�False)Zbuiltins_moduleZnon_stub_value_set�nextZget_filters�getZinfer)�inference_state�stringZtyping_builtins_module�builtins�filter_�name�value�r�Vc:\Users\shubh\Videos\agent\nova\Lib\site-packages\jedi/inference/compiled/__init__.py�builtin_from_name	s
   9  rcs8eZdZdZdd�Z�fdd�Zdd�Zdd	�Z�ZS)
  10  �
  11  ExactValuez�
  12      This class represents exact values, that makes operations like additions
  13      and exact boolean values possible, while still being a "normal" stub.
  14      cCs|j|_||_dS�N)r
  15  �_compiled_value)�self�compiled_valuerrr�__init__s
  16  zExactValue.__init__cs |dvr
  17  t|j|�St��|�S)N)Zget_safe_valueZexecute_operationZ
  18  access_handle�negateZ
  19  py__bool__Zis_compiled)�getattrr�super�__getattribute__)rr��	__class__rrrszExactValue.__getattribute__cCst|j|jjj���\}|Sr)rr
  20  rrZstring_name�execute_with_values)r�instancerrr�_get_wrapped_value$s��zExactValue._get_wrapped_valuecCsd|jj|jfS)Nz<%s: %s>)r!�__name__r)rrrr�__repr__)szExactValue.__repr__)	r%�
  21  __module__�__qualname__�__doc__rrr$r&�
  22  __classcell__rrr rrsrcCs@t|�tttttttfvsJt|���t	||j
  23  �|��}t|�S)z`
  24      Only allows creations of objects that are easily picklable across Python
  25      versions.
  26      )
  27  �type�int�float�str�bytes�slice�complex�bool�reprr�compiled_subprocess�create_simple_objectr)r
  28  �objrrrrr5-s&
  29  �r5cCst|d���S)Nr.)rr")r
  30  rrr�get_string_value_set:sr7cKs:|�d�rdS|jjdd|i|��}|durdSt||�S)Nztensorflow.�dotted_namer)�
  31  startswithr4�load_moduler)r
  32  r8�kwargsZaccess_pathrrrr:>s
  33  
  34  r:N)
  35  Zjedi.inference.compiled.valuerrrrrZjedi.inference.base_valuerrrr5r7r:rrrr�<module>s
  36