HEX
Server: LiteSpeed
System: Linux shams.tasjeel.ae 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: infowars (1469)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //usr/lib/python3.9/site-packages/argcomplete/__pycache__/_check_module.cpython-39.pyc
a

�]!
�
@s�dZddlZddlZddlZzddlmZWn@eylddlmZddl	m
Z
edgd��Zdd	�ZYn0Gd
d�de�Z
dd
d�Zdd�Zedkr�z
e�Wn.e
y�Zze�e�WYdZ[n
dZ[00dS)a
Utility for locating a module (or package's __main__.py) with a given name
and verifying it contains the PYTHON_ARGCOMPLETE_OK marker.

The module name should be specified in a form usable with `python -m`.

Intended to be invoked by argcomplete's global completion function.
�N)�	find_spec)�
namedtuple)�find_module�
ModuleSpec)�origin�has_location�submodule_search_locationscCsZzt|�\}}}Wnty&YdS0|du}|durFtd||g�S|��t||d�S)z-Minimal implementation as required by `find`.N)r�ImportErrorr�close)�name�f�path�_r�r�=/usr/lib/python3.9/site-packages/argcomplete/_check_module.pyrsrc@seZdZdS)�ArgcompleteMarkerNotFoundN)�__name__�
__module__�__qualname__rrrrr#srFcCs�|�d�}t|d�}|dur0td�|d���|js>td��|jdurlt|�dkrftd�|d���|jSt|j�dkr�td��tj	j
|jdg|dd��R�}tj	�|�r�d}|r�d	}tj	�
||�S|d
SdS)N�.rzno module named "{}"zcannot locate file�z{} is not a packagezexpecting one search locationz__main__.pyz__init__.pyz.py)�splitrr�formatrr�lenr�osr
�join�isdir)rZreturn_package�names�specr
�filenamerrr�find's.
�
�"r cCs�ztjd}Wnty(td��Yn0t|�}ttd�rDtj}nt}z||�}Wntyntd��Yn0|�|�	d�}Wd�n1s�0Yd|vr�td��dS)Nrz$missing argument on the command line�openzcannot open fileiZPYTHON_ARGCOMPLETE_OKzmarker not found)
�sys�argv�
IndexErrorrr �hasattr�tokenizer!�OSError�read)rrZ	open_func�fp�headrrr�main@s 
(r+�__main__)F)�__doc__rr"r&�importlib.utilrr	�collectionsr�imprr�RuntimeErrorrr r+r�e�exitrrrr�<module>s(�