You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2025/05/01 15:48:12 UTC

(airflow) branch v3-0-test updated: [v3-0-test] Fix links to source examples in Airflow docs (#50082) (#50084)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-0-test by this push:
     new b85073d25f9 [v3-0-test] Fix links to source examples in Airflow docs (#50082) (#50084)
b85073d25f9 is described below

commit b85073d25f9c38191c3195566bc7a45fe1ab2dec
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Thu May 1 17:48:05 2025 +0200

    [v3-0-test] Fix links to source examples in Airflow docs (#50082) (#50084)
    
    While #49978 added back source links and it nicely works for
    the providers, there was still a problem with links to sources in
    Airflow - they were prefixed with extra `src`. This PR fixes it.
    (cherry picked from commit 6b350900796f44ade8a339769b6c2d3142141cc5)
    
    Co-authored-by: Jarek Potiuk <ja...@potiuk.com>
---
 devel-common/src/sphinx_exts/exampleinclude.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/devel-common/src/sphinx_exts/exampleinclude.py b/devel-common/src/sphinx_exts/exampleinclude.py
index 3feaed367c3..2731f6522bf 100644
--- a/devel-common/src/sphinx_exts/exampleinclude.py
+++ b/devel-common/src/sphinx_exts/exampleinclude.py
@@ -195,6 +195,9 @@ def create_node(env, relative_path, show_button):
     if relative_path.startswith("airflow-core/src/"):
         relative_path = relative_path.replace("airflow-core/src/", "", 1)
 
+    if relative_path.startswith("src/"):
+        relative_path = relative_path.replace("src/", "", 1)
+
     if relative_path.endswith(".py"):
         pagename = "_modules/" + relative_path[:-3]
     else: