File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ def setup(app: Sphinx) -> dict[str, Any]:
3737
3838
3939def set_linkcode_resolve (app : Sphinx , _ : BuildEnvironment ) -> None :
40- raw_config = app .config ._raw_config # pyright: ignore[reportPrivateUsage]
4140 github_repo : str | None = app .config .api_github_repo
4241 if github_repo is None :
4342 msg = (
@@ -46,7 +45,7 @@ def set_linkcode_resolve(app: Sphinx, _: BuildEnvironment) -> None:
4645 )
4746 raise ValueError (msg )
4847 debug : bool = app .config .api_linkcode_debug
49- raw_config [ " linkcode_resolve" ] = get_linkcode_resolve (github_repo , debug )
48+ app . config . linkcode_resolve = get_linkcode_resolve (github_repo , debug ) # type: ignore[attr-defined]
5049
5150
5251def generate_apidoc (app : Sphinx , _ : BuildEnvironment ) -> None :
Original file line number Diff line number Diff line change @@ -118,15 +118,15 @@ def get_blob_url(github_repo: str) -> str:
118118 print_once (f"The URL { blob_url } seems not to exist" , color = Fore .MAGENTA )
119119 tag = _get_latest_tag ()
120120 if tag is not None :
121- blob_url = f"{ repo_url } /tree /{ tag } "
121+ blob_url = f"{ repo_url } /blob /{ tag } "
122122 print_once (f"--> falling back to { blob_url } " , color = Fore .MAGENTA )
123123 if _url_exists (blob_url ):
124124 return blob_url
125- blob_url = f"{ repo_url } /tree /main"
125+ blob_url = f"{ repo_url } /blob /main"
126126 print_once (f"--> falling back to { blob_url } " , color = Fore .MAGENTA )
127127 if _url_exists (blob_url ):
128128 return blob_url
129- blob_url = f"{ repo_url } /tree /master"
129+ blob_url = f"{ repo_url } /blob /master"
130130 print_once (f"--> falling back to { blob_url } " , color = Fore .MAGENTA )
131131 return blob_url
132132
You can’t perform that action at this time.
0 commit comments