66
77from docutils import nodes
88from docutils .parsers .rst import Directive
9- from docutils .statemachine import ViewList
9+ from docutils .statemachine import StringList
1010
1111from manim .utils .docbuild .module_parsing import parse_module_attributes
1212
@@ -143,7 +143,7 @@ def run(self) -> list[nodes.Element]:
143143 # Using the `.. class::` directive is CRUCIAL, since
144144 # function/method parameters are always annotated via
145145 # classes - therefore Sphinx expects a class
146- unparsed = ViewList (
146+ unparsed = StringList (
147147 [
148148 f".. class:: { alias_name } " ,
149149 "" ,
@@ -169,7 +169,9 @@ def run(self) -> list[nodes.Element]:
169169 # Add all the lines with 4 spaces behind, to consider all the
170170 # documentation as a paragraph INSIDE the `.. class::` block
171171 doc_lines = alias_doc .split ("\n " )
172- unparsed .extend (ViewList ([f" { line } " for line in doc_lines ]))
172+ unparsed .extend (
173+ StringList ([f" { line } " for line in doc_lines ])
174+ )
173175
174176 # Parse the reST text into a fresh container
175177 # https://www.sphinx-doc.org/en/master/extdev/markupapi.html#parsing-directive-content-as-rest
@@ -191,7 +193,7 @@ def run(self) -> list[nodes.Element]:
191193 # Using the `.. class::` directive is CRUCIAL, since
192194 # function/method parameters are always annotated via
193195 # classes - therefore Sphinx expects a class
194- unparsed = ViewList (
196+ unparsed = StringList (
195197 [
196198 f".. class:: { name } " ,
197199 "" ,
@@ -218,7 +220,7 @@ def run(self) -> list[nodes.Element]:
218220 # Let Sphinx Autosummary do its thing as always
219221 # Add all the attribute names with 4 spaces behind, so that
220222 # they're considered as INSIDE the `.. autosummary::` block
221- unparsed = ViewList (
223+ unparsed = StringList (
222224 [
223225 ".. autosummary::" ,
224226 * (f" { attr } " for attr in module_attrs_list ),
0 commit comments