Skip to content

Commit

Permalink
Add docstring to parseVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburr committed Sep 14, 2020
1 parent 4474ea2 commit ff74571
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/diraccfg/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

def parseVersion(versionString):
"""Parse a DIRAC-style version sting
:param versionString: Version identifier to parse
:returns: `tuple` of 4 values (major, minor, patch, pre). All values will be
`int` except "pre" which is `None` for released versions.
:raises: ValueError if the versionString is invalid
"""
match = re.match(
r"^v(?P<major>\d+)r(?P<minor>\d+)(?:p(?P<patch>\d+))?(?:-pre(?P<pre>\d+))?$",
Expand Down

0 comments on commit ff74571

Please sign in to comment.