Skip to content

Commit

Permalink
chore: simplify regex for rethinkdb case
Browse files Browse the repository at this point in the history
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
  • Loading branch information
gabor-boros committed Dec 10, 2023
1 parent c978af7 commit f6cbffc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


RETHINKDB_VERSION_DESCRIBE = os.environ.get("RETHINKDB_VERSION_DESCRIBE")
VERSION_RE = r"(?P<major>[0-9]+)\.(?P<minor>[0-9]+)\.(?P<patch>[0-9]+)(?P<pre_release>:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?P<meta>:\+[0-9A-Za-z-]+)?"
VERSION_RE = r"(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)\.(?P<post>post[1-9]\d*)"

with open("rethinkdb/version.py", "r") as f:
version_parts = re.search(VERSION_RE, f.read()).groups()
Expand Down

0 comments on commit f6cbffc

Please sign in to comment.