�
L�g�3 � �� � d Z ddlmZ ddlmZ ddlmZmZmZm Z m
Z
mZmZm
Z
mZ ddlmZ ddlmZ ddlmZmZmZmZmZmZmZ e
d d
�� � Z G d� d
e� � Zd
S )zR
This module provides an object oriented interface for pattern matching of files.
� )�
Collection)�zip_longest) �AnyStr�Callabler �Iterable�Iterator�Optional�Type�TypeVar�Union� )�util)�Pattern)�CheckResult�StrPath�TStrPath� TreeEntry�_filter_check_patterns�_is_iterable�normalize_file�Self�PathSpec)�boundc
� � e Zd ZdZdee ddfd�Zdedefd�Z de
fd�Zd edd defd
�Z
d edd defd�Z d!ded
eee dee fd�Z d!dee d
eee deee fd�Z d"dedeeegdf dee deee fd�Zedee deeeegef f dee defd�� � Z d!dd�dee d
eee dee dee fd�Z! e"e#j$ � � Z% d!ded
eee defd�Z& d!dd�dee d
eee dee dee fd�Z' d"dd�dedeeegdf dee dee dee f
d�Z( d"dd�dedeeegdf dee dee dee f
d �Z)e)Z*dS )#r zd
The :class:`PathSpec` class is a wrapper around a list of compiled
:class:`.Pattern` instances.
�patterns�returnNc �\ � t |t � � st |� � }|| _ dS )z�
Initializes the :class:`PathSpec` instance.
*patterns* (:class:`~collections.abc.Collection` or :class:`~collections.abc.Iterable`)
yields each compiled pattern (:class:`.Pattern`).
N)�
isinstance�CollectionType�listr )�selfr s �a/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/pathspec/pathspec.py�__init__zPathSpec.__init__- s2 � �
�H�n� -� -� ��8�n�n�8�'/�$�-�� � �otherc � � t |t � � r3t | j |j � � }t d� |D � � � � S t
S )z�
Tests the equality of this path-spec with *other* (:class:`PathSpec`)
by comparing their :attr:`~PathSpec.patterns` attributes.
c 3 �( K � | ]
\ }}||k V � �d S �N� )�.0�a�bs r"