B
    S£†\   ã               @   sF   d dl mZmZmZmZmZ ddd„Zdd„ Ze ej	eeƒe¡ dS )é    )ÚMANAGERÚ	argumentsÚnodesÚinference_tipÚUseInferenceDefaultNc             C   sn   t j | ¡}|jstƒ ‚t dd¡}| j|_x2t|jƒD ]$}t 	¡ }||_||_
|g|j|< q8W t| ¡ fƒS )NÚ	NamespaceZ	docstring)r   ZCallSiteZ	from_callZkeyword_argumentsr   r   ZClassDefÚparentÚsetZ	EmptyNodeÚattrnameZinstance_attrsÚiterZinstantiate_class)ÚnodeÚcontextZcallsiteZ
class_nodeÚattrZ	fake_node© r   ú;lib/python3.7/site-packages/astroid/brain/brain_argparse.pyÚinfer_namespace   s    r   c             C   s:   | j }t|tjƒr6|jdko4t|jtjƒo4|jjdkS dS )Nr   ÚargparseF)ÚfuncÚ
isinstancer   Z	Attributer
   ÚexprÚNameÚname)r   r   r   r   r   Ú_looks_like_namespace   s    
r   )N)
Zastroidr   r   r   r   r   r   r   Zregister_transformZCallr   r   r   r   Ú<module>   s   
