Skip to content

Commit b660472

Browse files
committed
fixup! fix: Don't compute relative URLs of already relative ones
1 parent fd35665 commit b660472

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ maintain = [
7777
quality = [
7878
"darglint>=1.8",
7979
"flake8-bandit>=2.1",
80+
"bandit<1.7.3",
8081
"flake8-black>=0.2",
8182
"flake8-bugbear>=21.9",
8283
"flake8-builtins>=1.5",
@@ -93,11 +94,10 @@ tests = [
9394
"pytest>=6.2",
9495
"pytest-cov>=3.0",
9596
"pytest-randomly>=3.10",
96-
"pytest-sugar>=0.9",
9797
"pytest-xdist>=2.4",
9898
]
9999
typing = [
100-
"mypy>=0.910",
100+
"mypy>=0.910,<0.931",
101101
"types-markdown>=3.3",
102102
"types-toml>=0.10",
103103
]

src/mkdocs_autorefs/plugin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ def get_item_url( # noqa: WPS234
106106
"""
107107
url = self._get_item_url(identifier, fallback)
108108
if from_url is not None:
109-
parsed = urlsplit(link)
109+
parsed = urlsplit(url)
110110
if not parsed.scheme and not parsed.netloc:
111-
return relative_url(from_url, url)
111+
return relative_url(from_url, url)
112112
return url
113113

114114
def on_config(self, config: Config, **kwargs) -> Config: # noqa: W0613,R0201 (unused arguments, cannot be static)

0 commit comments

Comments
 (0)