
    dY	                         d dl Z d dlZd dlmZ d dlmZ ddlmZ ddlmZ ddl	m
Z
 d dlmZ d	d
ddddZ G d d          ZdS )    N)Path)Optional   )LEGACY_PATH)legacy_path)HOOK_LEGACY_PATH_ARG)_check_path)collection_pathpath)	file_pathr   )module_pathr   )
start_pathstartdir)pytest_ignore_collectpytest_collect_filepytest_pycollect_makemodulepytest_report_headerpytest_report_collectionfinishc                   2    e Zd ZdZd Zd Zej        fdZdS )PathAwareHookProxyz
    this helper wraps around hook callers
    until pluggy supports fixingcalls, this one will do

    it currently doesn't return full hook caller proxies for fixed hooks,
    this may have to be changed later depending on bugs
    c                     || _         d S N) _PathAwareHookProxy__hook_caller)selfhook_callers     5lib/python3.11/site-packages/_pytest/config/compat.py__init__zPathAwareHookProxy.__init__   s    (    c                 *    t          | j                  S r   )dirr   )r   s    r   __dir__zPathAwareHookProxy.__dir__!   s    4%&&&r   c                     t          | j        |          |t          vr| j        |<   S t          |         \   |          fd            }||_        || j        |<   |S )Nc                  H   |                      d           }|                      d           }|*t          j        t          j                  d           |#|t          ||           n#t          |          }n|J t          |          }|| <   || <    di | S )N)pylib_path_argpathlib_path_argr   )
stacklevel )popwarningswarnr   formatr	   r   r   )kw
path_valuefspath_value
fspath_varhookpath_vars      r   
fixed_hookz2PathAwareHookProxy.__getattr__.<locals>.fixed_hook,   s    -/VVHd-C-C
68ffZ6N6N+M,3+5   $%	    )#/#J===='2:'>'>'333!%l!3!3J)8!-:tzzbzz!r   )getattrr   imply_paths_hooks__dict____name__)r   key_wrapsr2   r/   r0   r1   s       @@@r   __getattr__zPathAwareHookProxy.__getattr__$   s    t)3//'''!%DM#K#4S#9 HjVD\\" " " " " " \". #&J!+DM#r   N)	r6   
__module____qualname____doc__r   r!   	functoolswrapsr9   r'   r   r   r   r      sW         ) ) )' ' ' '0o " " " " " "r   r   )r=   r)   pathlibr   typingr   compatr   r   
deprecatedr   _pytest.nodesr	   r4   r   r'   r   r   <module>rD      s                                             - - - - - - % % % % % % 90#:6&@  1 1 1 1 1 1 1 1 1 1r   