From 6fe5f92ef87245aec3af3a8c1c0a8dd080de5cf9 Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Wed, 16 Aug 2023 20:16:53 +0200 Subject: [PATCH] docs(python): Fix source link --- py-polars/docs/source/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/py-polars/docs/source/conf.py b/py-polars/docs/source/conf.py index 71a9c73ae1bd..dc81c5fca524 100644 --- a/py-polars/docs/source/conf.py +++ b/py-polars/docs/source/conf.py @@ -95,8 +95,8 @@ web_root = "https://pola-rs.github.io" # Specify version for version switcher dropdown menu -switcher_version_env = os.environ.get("POLARS_VERSION", "main") -version_match = re.fullmatch(r"py-(\d+\.\d+)\.\d+.*", switcher_version_env) +git_ref = os.environ.get("POLARS_VERSION", "main") +version_match = re.fullmatch(r"py-(\d+\.\d+)\.\d+.*", git_ref) switcher_version = version_match.group(1) if version_match is not None else "dev" html_theme_options = { @@ -210,7 +210,7 @@ def linkcode_resolve(domain, info): polars_root = (conf_dir_path.parent.parent / "polars").absolute() fn = os.path.relpath(fn, start=polars_root) - return f"{github_root}/blob/main/py-polars/polars/{fn}{linespec}" + return f"{github_root}/blob/{git_ref}/py-polars/polars/{fn}{linespec}" def _minify_classpaths(s: str) -> str: