Skip to content

Commit adb3246

Browse files
committed
improve readme
Signed-off-by: Kunz, Immanuel <immanuel.kunz@aisec.fraunhofer.de>
1 parent f2413c4 commit adb3246

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ comparisons such as for dependency resolution and vulnerability lookup where
128128
a "good enough" comparison accuracy is not acceptable. ``libversion`` does not
129129
handle version range notations.
130130
For this reason, univers adds support for libversion using a configuration option which allows users to use libversion as a fallback, i.e., in case the native version comparison fails. Usage:
131+
131132
.. code:: python
133+
134+
from univers.config import config
135+
from univers.versions import PypiVersion
136+
132137
v3 = PypiVersion("1.2.3-invalid")
133138
v4 = PypiVersion("1.2.4-invalid")
134139
result = v3 < v4 # Error without fallback

0 commit comments

Comments
 (0)