
    .Ph
                         d Z dgZddlZddlmZ ddlmZ ddlmZm	Z	m
Z
mZmZ ddlmZ erdd	lmZ dd
lmZ  G d de          ZdS )zHModule implementing a remote object allowing easy access to git remotes.RemoteReference    N)	join_path   )Head)AnyIteratorNoReturnTYPE_CHECKINGUnion)PathLike)Remote)Repoc                        e Zd ZdZej        Ze	 	 ddddee	df         ded         de
d	e
d
ed          f fd            Zedddd d	e
d
dfd            Zede
d	e
d
efd            Z xZS )r   z&A reference pointing to a remote head.Nrepor   common_pathremote)r   Nargskwargsreturnc                     |p| j         }|t          |t          |                    }t                                          ||          S )zLIterate remote references, and if given, constrain them to the given remote.)_common_path_defaultr   strsuper
iter_items)clsr   r   r   r   r   	__class__s         O/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/git/refs/remote.pyr   zRemoteReference.iter_items    sI     "=S%=#KV==K ww!!$444    refsc                 n    |j         j        ddg|R   |D ]}	 t          j        t          j                            |j        |j                             n# t          $ r Y nw xY w	 t          j        t          j                            |j        |j                             # t          $ r Y w xY wdS )zDelete the given remote references.

        :note:
            `kwargs` are given for comparability with the base class method as we
            should not narrow the signature.
        z-dz-rN)	gitbranchosremovepathjoin
common_dirOSErrorgit_dir)r   r   r   r   refs        r   deletezRemoteReference.delete5   s     	d*T****  	 	C	"',,tAABBBB   	"',,t|SX>>????   	 	s#   <A
A$#A$(<B%%
B21B2c                      t          d          )zERaise :exc:`TypeError`. Defined so the ``create`` method is disabled.z*Cannot explicitly create remote references)	TypeError)r   r   r   s      r   createzRemoteReference.createL   s     DEEEr   )NN)__name__
__module____qualname____doc__r   _remote_common_path_defaultr   classmethodr   r   r   r   r   r+   r	   r.   __classcell__)r   s   @r   r   r      s.       00; .2(,	5 55 8T>*5 n%	5
 5 5 
#	$5 5 5 5 5 [5( & ): c d    [, F3 F# F( F F F [F F F F Fr   )r2   __all__r#   git.utilr   headr   typingr   r   r	   r
   r   	git.typesr   
git.remoter   git.repor   r    r   r   <module>r>      s    O N
 				             A @ @ @ @ @ @ @ @ @ @ @ @ @       !!!!!!
4F 4F 4F 4F 4Fd 4F 4F 4F 4F 4Fr   