Skip to content

Commit 6b370a5

Browse files
Accepting semver regex in a better way (#198)
* Accepting semver regex in a better way * Update src/ansys_sphinx_theme/__init__.py Co-authored-by: Revathy Venugopal <[email protected]> --------- Co-authored-by: Revathy Venugopal <[email protected]>
1 parent c0428b5 commit 6b370a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ansys_sphinx_theme/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def get_version_match(semver: str) -> str:
5454
Matching version number in the form of a string.
5555
5656
"""
57-
if semver.endswith("dev0"):
57+
if "dev" in semver:
5858
return "dev"
59-
major, minor, _ = semver.split(".")
59+
major, minor, *_ = semver.split(".")
6060
return ".".join([major, minor])
6161

6262

0 commit comments

Comments
 (0)