BLD Removes post from release on website
@@ -87,9 +87,13 @@ copyright = '2007 - 2019, scikit-learn developers (BSD License)'
#
# The short X.Y version.
import sklearn
-version = parse(sklearn.__version__).base_version
-version = ".".join(version.split(".")[:2])
+parsed_version = parse(sklearn.__version__)
+version = ".".join(parsed_version.base_version.split(".")[:2])
# The full version, including alpha/beta/rc tags.
+# Removes post from release name
+if parsed_version.is_postrelease:
+ release = parsed_version.base_version
+else:
release = sklearn.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
