Skip to content

Commit

Permalink
[doc][api] fix autosummary parsing
Browse files Browse the repository at this point in the history
Signed-off-by: can <[email protected]>
  • Loading branch information
can-anyscale committed Jun 25, 2024
1 parent 5379d75 commit b33a611
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions ci/ray_ci/doc/autodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ def _parse_autodoc_rst(self, rst_file: str) -> List[API]:
with open(rst_file, "r") as f:
line = f.readline()
while line:
line = line.strip()

# parse currentmodule block
if line.startswith(_SPHINX_CURRENTMODULE_HEADER):
module = line[len(_SPHINX_CURRENTMODULE_HEADER) :].strip()
Expand Down
2 changes: 1 addition & 1 deletion ci/ray_ci/doc/test_autodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_walk():
f.write("\tapi_02.rst\n")
with open(os.path.join(tmp, "api_01.rst"), "w") as f:
f.write(".. currentmodule:: ci.ray_ci.doc\n")
f.write(".. autosummary::\n\n")
f.write(".. autosummary::\n")
f.write("\t~mock.mock_function\n")
f.write("\tmock.mock_module.mock_w00t\n")
with open(os.path.join(tmp, "api_02.rst"), "w") as f:
Expand Down

0 comments on commit b33a611

Please sign in to comment.