From 4c4b770c27f61d10f7358c1b87df899925fcbbc6 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Thu, 24 Jun 2021 11:18:35 +0800 Subject: [PATCH] docs: clarify behavior when `from_pattern` is not matched [skip ci] --- docs/usage.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/usage.rst b/docs/usage.rst index 001c0a7..83d2cf2 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -153,6 +153,9 @@ from_pattern, to_pattern Both are Python-compatible regular expressions. If ``from_pattern`` is found in the version string, it will be replaced with ``to_pattern``. + If ``from_pattern`` is not found, the version string remains unchanged and no + error is emitted. + missing_ok Suppress warnings and errors if a version checking module finds nothing. Currently only ``regex`` supports it.