
    0yi/                     r    d 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	lmZ  G d
 de      Zy)z
This module provides the simple backend for :class:`~pathspec.pathspec.PathSpec`.

WARNING: The *pathspec._backends.simple* package is not part of the public API.
Its contents and structure are likely to change.
    )Sequence)Optional)_Backend)Pattern)override)check_match_file   )enumerate_patternsc            	       r    e Zd ZdZddddee   dee   dee   ddfdZe	d	e
deee   ee   f   fd
       Zy)SimplePsBackendz
	The :class:`SimplePsBackend` class is the default (or simple) implementation
	used by :class:`~pathspec.pathspec.PathSpec` for matching files.
	N)	no_filter
no_reversepatternsr   r   returnc                @    | | _         	 t        || |       | _        y)a  
		Initialize the :class:`SimplePsBackend` instance.

		*patterns* (:class:`Sequence` of :class:`.Pattern`) contains the compiled
		patterns.

		*no_filter* (:class:`bool`) is whether to keep no-op patterns (:data:`True`),
		or remove them (:data:`False`).

		*no_reverse* (:class:`bool`) is whether to keep the pattern order
		(:data:`True`), or reverse the order (:data:`True`).
		)filterreverseN)_is_reversedr
   	_patterns)selfr   r   r   s       d/var/www/html/content_weaver/venv/lib/python3.12/site-packages/pathspec/_backends/simple/pathspec.py__init__zSimplePsBackend.__init__    s2    ( !+N$ /A	Mz>/$.    filec                 D    t        | j                  || j                        S )a  
		Check the file against the patterns.

		*file* (:class:`str`) is the normalized file path to check.

		Returns a :class:`tuple` containing whether to include *file* (:class:`bool`
		or :data:`None`), and the index of the last matched pattern (:class:`int` or
		:data:`None`).
		)r   r   r   )r   r   s     r   
match_filezSimplePsBackend.match_fileA   s     
$..$0A0A	BBr   )__name__
__module____qualname____doc__r   r   r   boolr   r   strtupleintr    r   r   r   r      s     ##W d^	
 tn B 
CC 
CE(4.(3-*G$H 
C 
Cr   r   N)r    collections.abcr   typingr   pathspec.backendr   pathspec.patternr   pathspec._typingr   pathspec.utilr   _utilsr
   r   r%   r   r   <module>r-      s;   
2Ch 2Cr   