
    {bj	                     &    S SK Jr   " S S\5      rg)   )	constantsc                      ^  \ rS rSr% Sr\S-  \S'   \\S'   \S-  \S'   \\S'      SS\S\S-  S\S-  S	\S-  S
S 4
U 4S jjjrS rS
\4S jr	Sr
U =r$ )ResolvedRevision   a<  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U ]  Xb  UO[        R                  5      nX%l        Xl        X5l        U=(       d    [        R                  Ul        U$ N)	super__new__r   DEFAULT_REVISIONr   r   r	   REPO_TYPE_MODELr
   )clsr   r   r   r   revision	__class__s         ڕ/tmp/claude-0/-home-danvics-docker-quiz/c1e0577a-e42c-4a3d-b1ea-3edd61103a4e/scratchpad/stt/lib/python3.13/site-packages/huggingface_hub/_revision.pyr   ResolvedRevision.__new__*   sJ     7?33FILfLfg"$#'D9+D+D    c                 v    U R                   U R                  U R                  U R                  U R                  44$ r   )r   r   r   r	   r
   selfs    r   
__reduce__ResolvedRevision.__reduce__9   s*    ~~t||T]]DOO\\\r   c                 @    SU R                   < SU R                  < S3$ )NzResolvedRevision(initial=z, resolved=))r   r   r   s    r   __repr__ResolvedRevision.__repr__=   s"    *4<<*:+dmmEVVWXXr    )NNN)__name__
__module____qualname____firstlineno____doc__str__annotations__r   r   r!   __static_attributes____classcell__)r   s   @r   r   r      s    @ 4ZMDjO
 #" $ t t	
 : 
 ]Y# Y Yr   r   N) r   r)   r   r#   r   r   <module>r.      s    :Ys :Yr   