
    ni/                     z    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dS )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            	           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dS )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                J    | | _         	 t          || |           | _        dS )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       _/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/pathspec/_backends/simple/pathspec.py__init__zSimplePsBackend.__init__    sA    ( !+N$ /A	Mz>/ / /$.     filec                 8    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     
$.$0A	B	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 
C (
C 
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 2C 2C 2C 2Ch 2C 2C 2C 2C 2Cr   