Skip to content

Commit f6cbffc

Browse files
committed
chore: simplify regex for rethinkdb case
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
1 parent c978af7 commit f6cbffc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232
RETHINKDB_VERSION_DESCRIBE = os.environ.get("RETHINKDB_VERSION_DESCRIBE")
33-
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-]+)?"
33+
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*)"
3434

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

0 commit comments

Comments
 (0)