Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
]]
```

12 changes: 7 additions & 5 deletions types/version.pp
Original file line number Diff line number Diff line change
@@ -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/
]
]