§
    ìXÊjõ	  ã                   ó.   — d dl mZ  G d„ de¦  «        ZdS )é   )Ú	constantsc                   óš   ‡ — e Zd ZU dZedz  ed<   eed<   edz  ed<   eed<   	 	 	 ddededz  dedz  dedz  d	d f
ˆ fd
„Zd„ Zd	efd„Zˆ xZ	S )ÚResolvedRevisiona   A git revision that has already been resolved to a commit hash.

    `ResolvedRevision` is a `str` subclass, so it can be passed to any `huggingface_hub` method taking a `revision`
    argument. Its string value is the revision initially requested by the user (e.g. `"main"`, `"refs/pr/4"`),
    which keeps URLs and error messages readable, while `.resolved` holds the commit hash it points to.

    Instances are built by [`HfApi.resolve_revision`], which also caches the `revision` -> `commit hash` mapping
    in the local cache (`refs/` folder).

    A commit hash only means something for the repo it was resolved against, so an instance also remembers that
    repo. Re-resolving it for another repo is not an error: the revision initially requested is resolved again
    (see [`HfApi.resolve_revision`]).

    Attributes:
        initial (`str` or `None`):
            The revision initially requested by the user. If `None`, the string value defaults to `"main"`.
        resolved (`str`):
            The commit hash that `initial` resolves to.

    Example:
    ```python
    >>> from huggingface_hub import resolve_revision
    >>> revision = resolve_revision("openai-community/gpt2")
    >>> revision
    ResolvedRevision(initial=None, resolved='607a30d783dfa663caf39e06633721c8d4cfcd7e')
    >>> revision == "main"  # it's a string
    True
    >>> revision.resolved
    '607a30d783dfa663caf39e06633721c8d4cfcd7e'
    ```
    NÚinitialÚresolvedÚ_repo_idÚ
_repo_typeÚrepo_idÚ	repo_typeÚreturnc                 ó¸   •— t          ¦   «                              | |�|nt          j        ¦  «        }||_        ||_        ||_        |pt          j        |_        |S ©N)	ÚsuperÚ__new__r   ÚDEFAULT_REVISIONr   r   r   ÚREPO_TYPE_MODELr	   )Úclsr   r   r
   r   ÚrevisionÚ	__class__s         €úJC:\Projects\Historical\venv\Lib\site-packages\huggingface_hub/_revision.pyr   zResolvedRevision.__new__*   sU   ø€ õ ‘7”7—?’? 3°7Ð3F¨¨ÍIÔLfÑgÔgˆØ"ˆÔØ$ˆÔà#ˆÔØ'ÐD­9Ô+DˆÔØˆó    c                 óD   — | j         | j        | j        | j        | j        ffS r   )r   r   r   r   r	   ©Úselfs    r   Ú
__reduce__zResolvedRevision.__reduce__9   s    € àŒ~ ¤¨t¬|¸T¼]ÈDÌOÐ\Ð\Ð\r   c                 ó(   — d| j         ›d| j        ›d�S )NzResolvedRevision(initial=z, resolved=ú))r   r   r   s    r   Ú__repr__zResolvedRevision.__repr__=   s   € ØX¨4¬<ÐXÐXÀdÄmÐXÐXÐXÐXr   )NNN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstrÚ__annotations__r   r   r   Ú__classcell__)r   s   @r   r   r      s   ø€ € € € € € ðð ð@ �4‰ZÐÐÑØ€M€M�MØ�D‰jÐÐÑØ€O€O�Oð
 #Ø"Ø $ðð àðð �t‘ðð �t‘ð	ð
 ˜‘:ðð 
ðð ð ð ð ð ð]ð ]ð ]ðY˜#ð Yð Yð Yð Yð Yð Yð Yð Yr   r   N)Ú r   r#   r   © r   r   ú<module>r(      sU   ðØ Ð Ð Ð Ð Ð ð:Yð :Yð :Yð :Yð :Y�sñ :Yô :Yð :Yð :Yð :Yr   