diff --git a/REFERENCE.md b/REFERENCE.md index 4352dd43..f5d739e2 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1212,5 +1212,14 @@ Alias of `Pattern[/^(<|>|<=|>=|==) [0-9]*(\.[0-9]+)*$/, /\Alatest\Z/]` Match all valid versions for python -Alias of `Pattern[/\A(python)?[0-9](\.?[0-9])*/, /\Apypy\Z/, /\Asystem\Z/, /\Arh-python[0-9]{2}(?:-python)?\Z/]` +Alias of + +```puppet +Variant[Integer, Pattern[ + /\A(python)?[0-9](\.?[0-9])*/, + /\Apypy\Z/, + /\Asystem\Z/, + /\Arh-python[0-9]{2}(?:-python)?\Z/ + ]] +``` diff --git a/types/version.pp b/types/version.pp index 5bbcaaa8..075d3587 100644 --- a/types/version.pp +++ b/types/version.pp @@ -1,8 +1,10 @@ # @summary Match all valid versions for python # -type Python::Version = Pattern[ - /\A(python)?[0-9](\.?[0-9])*/, - /\Apypy\Z/, - /\Asystem\Z/, - /\Arh-python[0-9]{2}(?:-python)?\Z/ +type Python::Version = Variant[Integer, + Pattern[ + /\A(python)?[0-9](\.?[0-9])*/, + /\Apypy\Z/, + /\Asystem\Z/, + /\Arh-python[0-9]{2}(?:-python)?\Z/ + ] ]