|
45 | 45 | exclude_fn_members = {}
|
46 | 46 |
|
47 | 47 | installation_page_url = (
|
48 |
| - "https://docs.nvidia.com/deeplearning/dali/user-guide/docs/installation.html" |
| 48 | + "https://docs.nvidia.com/deeplearning/dali/user-guide/" |
| 49 | + "docs/installation.html" |
49 | 50 | )
|
50 | 51 |
|
51 | 52 | mod_aditional_doc = {
|
@@ -87,11 +88,15 @@ def get_functions(module):
|
87 | 88 | or hidden members. No nested modules would be reported."""
|
88 | 89 | result = []
|
89 | 90 | # Take all public members of given module
|
90 |
| - public_members = list(filter(lambda x: not str(x).startswith("_"), dir(module))) |
| 91 | + public_members = list( |
| 92 | + filter(lambda x: not str(x).startswith("_"), dir(module)) |
| 93 | + ) |
91 | 94 | for member_name in public_members:
|
92 | 95 | member = getattr(module, member_name)
|
93 | 96 | # Just user-defined functions
|
94 |
| - if inspect.isfunction(member) and not member.__module__.endswith("hidden"): |
| 97 | + if inspect.isfunction(member) and not member.__module__.endswith( |
| 98 | + "hidden" |
| 99 | + ): |
95 | 100 | result.append(member_name)
|
96 | 101 | return result
|
97 | 102 |
|
@@ -157,7 +162,9 @@ def single_module_file(module, funs_in_module, references):
|
157 | 162 | result += "\n"
|
158 | 163 |
|
159 | 164 | result += f"The following table lists all operations available in ``{module}`` module:\n"
|
160 |
| - result += operations_table.operations_table_str(get_schema_names(module, funs_in_module)) |
| 165 | + result += operations_table.operations_table_str( |
| 166 | + get_schema_names(module, funs_in_module) |
| 167 | + ) |
161 | 168 | result += "\n\n"
|
162 | 169 |
|
163 | 170 | result += ".. toctree::\n :hidden:\n\n"
|
@@ -185,15 +192,22 @@ def fn_autodoc(out_filename, generated_path, references):
|
185 | 192 | # the rest is within the same directory, so there is no need for that
|
186 | 193 | all_modules_str += f" {generated_path / module}\n"
|
187 | 194 |
|
188 |
| - single_module_str = single_module_file(module, funs_in_module, references) |
| 195 | + single_module_str = single_module_file( |
| 196 | + module, funs_in_module, references |
| 197 | + ) |
189 | 198 | with open(generated_path / (module + ".rst"), "w") as module_file:
|
190 | 199 | module_file.write(single_module_str)
|
191 | 200 |
|
192 | 201 | for fun in funs_in_module:
|
193 | 202 | full_name = f"{module}.{fun}"
|
194 |
| - if module in exclude_fn_members and fun in exclude_fn_members[module]: |
| 203 | + if ( |
| 204 | + module in exclude_fn_members |
| 205 | + and fun in exclude_fn_members[module] |
| 206 | + ): |
195 | 207 | continue
|
196 |
| - with open(generated_path / (full_name + ".rst"), "w") as function_file: |
| 208 | + with open( |
| 209 | + generated_path / (full_name + ".rst"), "w" |
| 210 | + ) as function_file: |
197 | 211 | single_file_str = single_fun_file(full_name, references)
|
198 | 212 | function_file.write(single_file_str)
|
199 | 213 |
|
|
0 commit comments