a
    Š©lc{  ã                   @   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 n00 | d¡}|jdd… }|jdkrl|dd… }|dur¢| 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	   Úrelative_pathÚrestZactual_value_setZstub© r   úX/var/www/html/django/DPS/env/lib/python3.9/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   