@@ -141,7 +141,7 @@ def visit_Assign(self, node):
141141
142142
143143project = 'line_profiler'
144- copyright = '2025 , Robert Kern'
144+ copyright = '2026 , Robert Kern'
145145author = 'Robert Kern'
146146modname = 'line_profiler'
147147
@@ -435,7 +435,7 @@ class PatchedPythonDomain(PythonDomain):
435435 """
436436
437437 def resolve_xref (
438- self , env , fromdocname , builder , typ , target , node , contnode
438+ self , env , fromdocname , builder , type , target , node , contnode
439439 ):
440440 """
441441 Helps to resolves cross-references
@@ -445,7 +445,7 @@ def resolve_xref(
445445 if target .startswith ('xdoc.' ):
446446 target = 'xdoctest.' + target [3 ]
447447 return_value = super (PatchedPythonDomain , self ).resolve_xref (
448- env , fromdocname , builder , typ , target , node , contnode
448+ env , fromdocname , builder , type , target , node , contnode
449449 )
450450 return return_value
451451
@@ -838,10 +838,12 @@ def create_doctest_figure(app, obj, name, lines):
838838 The idea is that each doctest that produces a figure should generate that
839839 and then that figure should be part of the docs.
840840 """
841- import xdoctest
842841 import sys
843842 import types
844843
844+ import xdoctest
845+ import xdoctest .core
846+
845847 if isinstance (obj , types .ModuleType ):
846848 module = obj
847849 else :
@@ -1035,9 +1037,10 @@ def postprocess_hyperlinks(app, doctree, docname):
10351037 "autodoc-process-docstring" event.
10361038 """
10371039 # Your hyperlink postprocessing logic here
1038- from docutils import nodes
10391040 import pathlib
10401041
1042+ from docutils import nodes
1043+
10411044 for node in doctree .traverse (nodes .reference ):
10421045 if 'refuri' in node .attributes :
10431046 refuri = node .attributes ['refuri' ]
@@ -1054,14 +1057,15 @@ def postprocess_hyperlinks(app, doctree, docname):
10541057
10551058
10561059def fix_rst_todo_section (lines ):
1057- new_lines = []
1060+ # new_lines = []
10581061 for line in lines :
10591062 ...
10601063 ...
10611064
10621065
10631066def setup (app ):
10641067 import sphinx
1068+ import sphinx .application
10651069
10661070 app : sphinx .application .Sphinx = app
10671071 app .add_domain (PatchedPythonDomain , override = True )
0 commit comments