Skip to content

Commit afda566

Browse files
committed
fix: minor changes
1 parent c649d18 commit afda566

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/pyconverter/xml2py/ast_tree.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ def to_rst(self, indent="", max_length=100):
10531053
"""Return a string to enable converting the element to an RST format."""
10541054
tail = self.tail
10551055
if tail and "*" in tail:
1056-
tail = self.tail.replace("*", "\*")
1056+
tail = self.tail.replace("*", r"\*")
10571057
rst_replaceable = f"``{self.content[0]}`` {tail}"
10581058
if isinstance(self.prev_elem, Command):
10591059
if any([self.content[0] in arg for arg in self.prev_elem.args]):
@@ -1578,7 +1578,7 @@ def entityref(self):
15781578
entityref = entityref.strip()
15791579
return entityref
15801580

1581-
def to_rst(self, fcache, indent="", max_length=100):
1581+
def to_rst(self, indent="", max_length=100, fcache=None):
15821582
"""Return a string to enable converting the element to an RST format."""
15831583

15841584
if self.entityref is None:
@@ -3235,7 +3235,9 @@ def py_parm(self, custom_functions=None, links=None, base_url=None, fcache=None)
32353235
lines.append("-" * 10)
32363236
for argument in arg_desc:
32373237
lines.extend(
3238-
argument.to_py_docstring(self._max_length, links, base_url, fcache)
3238+
argument.to_py_docstring(
3239+
self._max_length, links=links, base_url=base_url, fcache=fcache
3240+
)
32393241
)
32403242
lines.append("")
32413243
else:
@@ -3244,7 +3246,11 @@ def py_parm(self, custom_functions=None, links=None, base_url=None, fcache=None)
32443246
elif len(arg_desc) > 0:
32453247
lines.append("-" * 10)
32463248
for argument in arg_desc:
3247-
lines.extend(argument.to_py_docstring(self._max_length, links, base_url, fcache))
3249+
lines.extend(
3250+
argument.to_py_docstring(
3251+
self._max_length, links=links, base_url=base_url, fcache=fcache
3252+
)
3253+
)
32483254
lines.append("")
32493255
return lines
32503256

0 commit comments

Comments
 (0)