File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
"""Generate the code reference pages and navigation."""
2
2
3
- import os
4
3
from pathlib import Path
5
-
4
+ import os
6
5
import mkdocs_gen_files
7
6
8
7
src = Path ("rucio/lib/rucio/client/" )
9
8
root = src .parent
10
9
doc_path = "/auto_generated/client_api"
11
10
files = os .listdir (doc_path )
12
- for file in files :
11
+ for file in files :
13
12
os .remove (f"{ doc_path } /{ file } " )
14
13
15
14
16
15
py_files = [f for f in list (src .rglob ("*.py" )) if "__init__.py" not in f .name ]
17
16
18
17
for path in py_files :
19
- module_name = path .name .split (" .py" )[0 ]
18
+ module_name = path .name .split (' .py' )[0 ]
20
19
full_doc_path = Path (f"{ doc_path } /{ module_name } .md" )
21
20
22
21
with mkdocs_gen_files .open (full_doc_path , "a" ) as fd :
23
22
module_path = path .relative_to (src ).with_suffix ("" )
24
23
fd .write (f"::: rucio.client.{ module_path } " )
25
- fd .write ("\n \n " )
24
+ fd .write ("\n \n " )
You can’t perform that action at this time.
0 commit comments