Skip to content

Commit d8c6605

Browse files
committed
ignore false-positive in hyperlink checks
It appears that mypy is now generating false-positives for some of the hyperlink check implementation. The types from the find call should all be node types checked by `is_confluence_href_node`, which are, for example, indexable; although mypy reports otherwise. If we replicate the same checks inside the loop without the wrap of `is_confluence_href_node`, mypy does not complain. For now, just ignore the warnings. Signed-off-by: James Knight <git@jdknight.me>
1 parent 8d1be46 commit d8c6605

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sphinxcontrib/confluencebuilder/transform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ def is_confluence_href_node(node):
3939
))
4040

4141
for refnode in self.document.findall(is_confluence_href_node):
42-
uri = refnode['confluence-params']['href']
42+
uri = refnode['confluence-params']['href'] # type: ignore[index]
4343

4444
if newuri := app.emit_firstresult('linkcheck-process-uri', uri):
4545
uri = newuri
4646

4747
try:
48-
lineno = get_node_line(refnode)
48+
lineno = get_node_line(refnode) # type: ignore[arg-type]
4949
except ValueError:
5050
lineno = -1
5151

0 commit comments

Comments
 (0)