
    zc.                     ,    d dl mZmZ d ZddZddZdS )    )PureWindowsPathPurePosixPathc                 6    |rt                      n'd |D             }d |D             }t                      ||z  }|r"t          d                    |                    t	           fd|D                       ot	           fd|D                        S )zJInternal function same as :func:`match_path` but does not check arguments.c                 6    h | ]}|                                 S  lower.0patterns     7lib/python3.11/site-packages/watchdog/utils/patterns.py	<setcomp>z_match_path.<locals>.<setcomp>        NNNW]]__NNN    c                 6    h | ]}|                                 S r   r   r
   s     r   r   z_match_path.<locals>.<setcomp>   r   r   z/conflicting patterns `{}` included and excludedc              3   B   K   | ]}                     |          V  d S Nmatchr   ppaths     r   	<genexpr>z_match_path.<locals>.<genexpr>   s-      99!

1999999r   c              3   B   K   | ]}                     |          V  d S r   r   r   s     r   r   z_match_path.<locals>.<genexpr>   s-      AA!

1AAAAAAr   )r   r   
ValueErrorformatany)r   included_patternsexcluded_patternscase_sensitivecommon_patternss   `    r   _match_pathr"      s     %T""NN<MNNNNN<MNNNt$$'*;;O dJQQRabbccc9999'899999 BAAAA/@AAAAAACr   NTc              #      K   |dgn|}|g n|}| D ]2}t          |t          |          t          |          |          r|V  3dS )a@  
    Filters from a set of paths based on acceptable patterns and
    ignorable patterns.
    :param pathnames:
        A list of path names that will be filtered based on matching and
        ignored patterns.
    :param included_patterns:
        Allow filenames matching wildcard patterns specified in this list.
        If no pattern list is specified, ["*"] is used as the default pattern,
        which matches all files.
    :param excluded_patterns:
        Ignores filenames matching wildcard patterns specified in this list.
        If no pattern list is specified, no files are ignored.
    :param case_sensitive:
        ``True`` if matching should be case-sensitive; ``False`` otherwise.
    :returns:
        A list of pathnames that matched the allowable patterns and passed
        through the ignored patterns.
    N*r"   setpathsr   r   r    includedexcludedr   s          r   filter_pathsr+   "   sm      ( *Huu7HH&Err4EH  tS]]CMM>JJ 	JJJ r   c                     |dgn|}|g n|}| D ]1}t          |t          |          t          |          |          r dS 2dS )a  
    Matches from a set of paths based on acceptable patterns and
    ignorable patterns.
    :param pathnames:
        A list of path names that will be filtered based on matching and
        ignored patterns.
    :param included_patterns:
        Allow filenames matching wildcard patterns specified in this list.
        If no pattern list is specified, ["*"] is used as the default pattern,
        which matches all files.
    :param excluded_patterns:
        Ignores filenames matching wildcard patterns specified in this list.
        If no pattern list is specified, no files are ignored.
    :param case_sensitive:
        ``True`` if matching should be case-sensitive; ``False`` otherwise.
    :returns:
        ``True`` if any of the paths matches; ``False`` otherwise.
    Nr$   TFr%   r'   s          r   match_any_pathsr-   >   sf    & *Huu7HH&Err4EH  tS]]CMM>JJ 	44	5r   )NNT)pathlibr   r   r"   r+   r-   r   r   r   <module>r/      sc    3 2 2 2 2 2 2 2C C C    8     r   