Skip to content

Commit

Permalink
doc: gh_utils: Remove unnecessary ZEPHYR_BASE config option
Browse files Browse the repository at this point in the history
Compute ZEPHYR_BASE like other extensions do rather than artificially
pretend it's a config option.

Signed-off-by: Benjamin Cabé <[email protected]>
  • Loading branch information
kartben authored and carlescufi committed Nov 9, 2023
1 parent 0f07889 commit cf52afb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/_extensions/zephyr/gh_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@
from datetime import datetime
from pathlib import Path
from textwrap import dedent
from typing import Optional, Tuple
from typing import Final, Optional, Tuple
from urllib.parse import quote

from sphinx.application import Sphinx
from sphinx.util.i18n import format_date

ZEPHYR_BASE : Final[str] = Path(__file__).parents[3]

__version__ = "0.1.0"

Expand Down Expand Up @@ -162,7 +163,7 @@ def git_info_filter(app: Sphinx, pagename) -> Optional[Tuple[str, str]]:
return None

orig_path = os.path.join(
app.config.ZEPHYR_BASE,
ZEPHYR_BASE,
page_prefix,
app.env.project.doc2path(pagename, basedir=False),
)
Expand Down Expand Up @@ -214,7 +215,6 @@ def add_jinja_filter(app: Sphinx):


def setup(app: Sphinx):
app.add_config_value("ZEPHYR_BASE", Path(__file__).resolve().parents[3], "html")
app.add_config_value("gh_link_version", "", "")
app.add_config_value("gh_link_base_url", "", "")
app.add_config_value("gh_link_prefixes", {}, "")
Expand Down

0 comments on commit cf52afb

Please sign in to comment.