We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bf0d7a commit b05c91fCopy full SHA for b05c91f
sphinxext/opengraph/__init__.py
@@ -4,7 +4,7 @@
4
import posixpath
5
from pathlib import Path
6
from typing import TYPE_CHECKING
7
-from urllib.parse import urljoin, urlparse, urlsplit, urlunsplit
+from urllib.parse import urljoin, urlparse
8
9
from docutils import nodes
10
@@ -254,9 +254,8 @@ def ambient_site_url() -> str:
254
# or defines the ``html_baseurl`` variable in conf.py
255
if rtd_canonical_url := os.getenv('READTHEDOCS_CANONICAL_URL'):
256
return rtd_canonical_url
257
- else:
258
- msg = 'ReadTheDocs did not provide a valid canonical URL!'
259
- raise RuntimeError(msg)
+ msg = 'ReadTheDocs did not provide a valid canonical URL!'
+ raise RuntimeError(msg)
260
261
262
def social_card_for_page(
0 commit comments