+
    ,j	                    P    ^ RI Ht ^ RIHtHt ^ RIHt ^ RIHt  ! R R]4      t	R# )    )annotations)UnionOptional)	PyVersion)Versionc                  d    ] tR t^
t$ RtR]R&   R R lt]RR R ll4       tR	 R
 lt	R R lt
RtR# )VersionWithSourcea  
Holds a version and the string it was created from. This is useful if
you want to retain the original string the version was created from.
This might be useful in cases where you have multiple strings that
are represented by the same [`Version`] but you still want to be able to
distinguish them.

The string `1.1` and `1.01` represent the same version. When you print
the parsed version though it will come out as `1.1`. You loose the
original representation. This class stores the original source string,
which can be accessed by `source` property.

This class derives from `Version` which allows you to compare it with
other `Version` objects.

Comparison will be done based on the parsed version, not the source string.
str_sourcec                   V ^8  d   QhRR/# )   versionzUnion[str, Version] )formats   ";lib/python3.14/site-packages/rattler/version/with_source.py__annotate__VersionWithSource.__annotate__   s     - - 3 -    c                	N   \        V\        \        34      '       g$   \        R \	        V4      P
                  : R24      h\        V\        4      '       d   Wn        \        V4      V n        \        V\        4      '       d$   \        V4      V n        VP                  V n        R# R# )z9VersionWithSource constructor received unsupported type  z for the `version` parameterN)	
isinstancer
   r   	TypeErrortype__name__r   r   _version)selfr   s   &&r   __init__VersionWithSource.__init__   s    'C>22M**--IK 
 gs##"L%g.DMgw''w<DL#,,DM (r   Nc               $    V ^8  d   QhRRRRRR/# )r   
py_versionr   sourcezOptional[str]returnr	   r   )r   s   "r   r   r   /   s"      ) ] Vg r   c                r    V P                  V 4      pWn        T;'       g    VP                  4       Vn        V# )z4Construct Rattler version from FFI PyVersion object.)__new__r   as_strr   )clsr   r    r   s   &&& r   _from_py_version"VersionWithSource._from_py_version.   s5     ++c"% 77J$5$5$7r   c                   V ^8  d   QhRR/# r   r!   r
   r   )r   s   "r   r   r   6   s       r   c                    V P                   # )z
Returns the string representation of the version

Examples
--------
```python
>>> str(VersionWithSource("1.02.3"))
'1.02.3'
>>>
```
)r   r   s   &r   __str__VersionWithSource.__str__6   s     ||r   c                   V ^8  d   QhRR/# r)   r   )r   s   "r   r   r   D   s     e e# er   c                    \        V 4      P                   RV P                  P                  4        RV P                   R2# )z
Returns a representation of the version

Examples
--------
```python
>>> VersionWithSource("1.02.3")
VersionWithSource(version="1.2.3", source="1.02.3")
>>>
```
z
(version="z", source="z"))r   r   r   r$   r   r+   s   &r   __repr__VersionWithSource.__repr__D   s?     t*%%&j1E1E1G0HTXT`T`Saacddr   )r   r   )N)r   
__module____qualname____firstlineno____doc____annotations__r   classmethodr&   r,   r0   __static_attributes__r   r   r   r	   r	   
   s8    $ L-  e er   r	   N)

__future__r   typingr   r   rattler.rattlerr   rattler.versionr   r	   r   r   r   <module>r=      s!    " " % #Fe Fer   