1515 Type , Union , cast )
1616
1717from docutils import nodes
18- from docutils .nodes import Element , Node , system_message
18+ from docutils .nodes import Element , Node , TextElement , system_message
1919from docutils .parsers .rst .states import Inliner
2020
2121from sphinx .addnodes import pending_xref
@@ -317,7 +317,7 @@ def process_field_xref(self, pnode: pending_xref) -> None:
317317 pass
318318
319319 def resolve_xref (self , env : "BuildEnvironment" , fromdocname : str , builder : "Builder" ,
320- typ : str , target : str , node : pending_xref , contnode : Element
320+ typ : str , target : str , node : pending_xref , contnode : TextElement
321321 ) -> Element :
322322 """Resolve the pending_xref *node* with the given *typ* and *target*.
323323
@@ -335,7 +335,7 @@ def resolve_xref(self, env: "BuildEnvironment", fromdocname: str, builder: "Buil
335335 pass
336336
337337 def resolve_any_xref (self , env : "BuildEnvironment" , fromdocname : str , builder : "Builder" ,
338- target : str , node : pending_xref , contnode : Element
338+ target : str , node : pending_xref , contnode : TextElement
339339 ) -> List [Tuple [str , Element ]]:
340340 """Resolve the pending_xref *node* with the given *target*.
341341
0 commit comments