File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/git/index/__pycache__/typ.cpython-310.pyc
Back
o ;jk � @ s� d Z g d�ZddlmZ ddlmZ ddlmZ ddlm Z m Z ddlmZm Z mZmZmZmZ dd lmZ er>dd lmZ eZdZdZd ZdZdZd ZdZG dd� d�ZG dd� de�Z G dd� de �Z!G dd� de!�Z"dS )z#Additional types used by the index.)� BlobFilter�BaseIndexEntry� IndexEntry� StageType� )�b2a_hex)�Path)�Blob� )�pack�unpack)� NamedTuple�Sequence� TYPE_CHECKING�Tuple�Union�cast)�PathLike)�Repoi� i 0 i @ i � � i c @ sD e Zd ZdZdZdee ddfdd�Zdee e f defd d �ZdS )r z�Predicate to be used by :meth:`IndexFile.iter_blobs <git.index.base.IndexFile.iter_blobs>` allowing to filter only return blobs which match the given list of directories or files. The given paths are given relative to the repository. ��pathsr �returnNc C s || _ dS )z� :param paths: Tuple or list of paths which are either pointing to directories or to files relative to the current repository. Nr )�selfr � r �A/opt/saltstack/salt/lib/python3.10/site-packages/git/index/typ.py�__init__3 s zBlobFilter.__init__� stage_blobc C s� |d j }t|t�r|nt|�}| jD ]+}t|t�r|nt|�}|j}|j}t|�t|�kr/qtdd� t||�D ��r> dS qdS )Nr c s s � | ] \}}||kV qd S )Nr )�.0�i�jr r r � <genexpr>F s � z&BlobFilter.__call__.<locals>.<genexpr>TF)�path� isinstancer r �parts�len�all�zip)r r Z blob_pathlikeZ blob_pathZpathliker! Zfilter_partsZ blob_partsr r r �__call__; s �zBlobFilter.__call__) �__name__� __module__�__qualname__�__doc__� __slots__r r r r r r �boolr'