Skip to content

Commit b05c91f

Browse files
committed
Fix lint errors
1 parent 4bf0d7a commit b05c91f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sphinxext/opengraph/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import posixpath
55
from pathlib import Path
66
from typing import TYPE_CHECKING
7-
from urllib.parse import urljoin, urlparse, urlsplit, urlunsplit
7+
from urllib.parse import urljoin, urlparse
88

99
from docutils import nodes
1010

@@ -254,9 +254,8 @@ def ambient_site_url() -> str:
254254
# or defines the ``html_baseurl`` variable in conf.py
255255
if rtd_canonical_url := os.getenv('READTHEDOCS_CANONICAL_URL'):
256256
return rtd_canonical_url
257-
else:
258-
msg = 'ReadTheDocs did not provide a valid canonical URL!'
259-
raise RuntimeError(msg)
257+
msg = 'ReadTheDocs did not provide a valid canonical URL!'
258+
raise RuntimeError(msg)
260259

261260

262261
def social_card_for_page(

0 commit comments

Comments
 (0)