File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,9 @@ def __init__(
112112 parallel : int = 0 ,
113113 ) -> None :
114114
115+ self .docutils_conf_path = srcdir / 'docutils.conf'
115116 if docutilsconf is not None :
116- ( srcdir / 'docutils.conf' ) .write_text (docutilsconf )
117+ self . docutils_conf_path .write_text (docutilsconf )
117118
118119 if builddir is None :
119120 builddir = srcdir / '_build'
@@ -154,6 +155,10 @@ def cleanup(self, doctrees: bool = False) -> None:
154155 method not in self ._saved_nodeclasses :
155156 delattr (nodes .GenericNodeVisitor , 'visit_' + method [6 :])
156157 delattr (nodes .GenericNodeVisitor , 'depart_' + method [6 :])
158+ try :
159+ os .remove (self .docutils_conf_path )
160+ except FileNotFoundError :
161+ pass
157162
158163 def __repr__ (self ) -> str :
159164 return f'<{ self .__class__ .__name__ } buildername={ self .builder .name !r} >'
You can’t perform that action at this time.
0 commit comments