Skip to content

Commit cdaa201

Browse files
committed
Fix dependencies / linting
1 parent 40f6278 commit cdaa201

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ dynamic = [
8181
"version",
8282
]
8383
dependencies = [
84+
"beautifulsoup4",
85+
"myst-parser[linkify]>=0.18,<5",
8486
"sphinx<7.2",
8587
"sphinx-design==0.6.1",
8688
]
@@ -95,7 +97,6 @@ optional-dependencies.develop = [
9597
]
9698
optional-dependencies.docs = [
9799
"furo",
98-
"myst-parser[linkify]>=0.18,<5",
99100
"sphinx-autobuild",
100101
"sphinx-copybutton",
101102
]

sphinx_design_elements/util/role.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from functools import lru_cache
22
from typing import Any, List, Optional, Tuple, Union
3+
from urllib.request import urlopen
34

5+
from bs4 import BeautifulSoup
46
from docutils import nodes
57
from myst_parser.mocking import MockInliner
68
from sphinx import addnodes
@@ -77,10 +79,6 @@ def get_html_page_title(url: str) -> str:
7779
if not (url.startswith("http://") or url.startswith("https://")):
7880
return url
7981

80-
from urllib.request import urlopen
81-
82-
from bs4 import BeautifulSoup
83-
8482
soup = BeautifulSoup(urlopen(url), "html.parser") # noqa: S310
8583
return soup.title and soup.title.get_text() or url
8684

0 commit comments

Comments
 (0)