o
    ð›h{  ã                   @   s(   d dl mZ d dlmZmZ dd„ ZdS )é    )ÚPath)ÚTYPESHED_PATHÚcreate_stub_modulec           
      C   s¦   |j }t|ƒ}|jdksJ ‚z| t¡}W n	 ty   Y nw | d¡}|jdd… }|jdkr6|dd… }|durQ| j	|dd�}t
| |||||ƒ}	|	| j|< |	S dS )	z\
    This function is given a random .pyi file and should return the proper
    module.
    z.pyiÚ é   NÚ__init__éÿÿÿÿF)Zprefer_stubs)Úpathr   ÚsuffixÚrelative_tor   Ú
ValueErrorÚwith_suffixÚpartsÚnameÚimport_moduler   Zstub_module_cache)
Zinference_stateZgrammarZfile_ioZimport_namesZmodule_noder	   Zrelative_pathÚrestZactual_value_setZstub© r   úRc:\Users\shubh\Videos\agent\nova\Lib\site-packages\jedi/inference/gradual/utils.pyÚload_proper_stub_module   s*   ÿ

þ
r   N)Úpathlibr   Zjedi.inference.gradual.typeshedr   r   r   r   r   r   r   Ú<module>   s    