Skip to content

Commit a99a99c

Browse files
committed
refactor: Remove unnecessary try/else clause
1 parent 0cedf9d commit a99a99c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/mkdocs_autorefs/plugin.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ def _get_item_url(
102102
self._url_map[identifier] = [url]
103103
return url
104104
raise
105-
else:
106-
if len(urls) > 1:
107-
log.warning(
108-
"Multiple URLs found for '%s': %s. "
109-
"Make sure to use unique headings, identifiers, or Markdown anchors (see our docs).",
110-
identifier,
111-
urls,
112-
)
113-
return urls[0]
105+
106+
if len(urls) > 1:
107+
log.warning(
108+
"Multiple URLs found for '%s': %s. "
109+
"Make sure to use unique headings, identifiers, or Markdown anchors (see our docs).",
110+
identifier,
111+
urls,
112+
)
113+
return urls[0]
114114

115115
def get_item_url(
116116
self,

0 commit comments

Comments
 (0)