Skip to content

Commit 8b2681f

Browse files
committed
more redundant ai stuff
1 parent 2fe51a7 commit 8b2681f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/doc_builder/build_doc.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ def _process_single_mdx_file(file_info: tuple) -> dict:
163163
164164
Args:
165165
file_info (tuple):
166-
Tuple containing file information (file_path, doc_folder, output_dir, page_info, version_tag_suffix,
167-
package_name).
166+
Tuple containing file information (file_path, doc_folder, output_dir, page_info, version_tag_suffix).
168167
169168
Returns:
170169
dict: Dictionary containing the processed results for this file (file, new_anchors, errors, source_files).
171170
"""
172-
file_path, doc_folder, output_dir, page_info, version_tag_suffix, package_name = file_info
171+
file_path, doc_folder, output_dir, page_info, version_tag_suffix = file_info
172+
package_name = page_info["package_name"]
173173

174174
file_path = Path(file_path)
175175
doc_folder = Path(doc_folder)
@@ -244,7 +244,7 @@ def _process_single_mdx_file(file_info: tuple) -> dict:
244244

245245
def build_mdx_files(package, doc_folder, output_dir, page_info, version_tag_suffix):
246246
"""
247-
Build the MDX files for a given package.
247+
Build the MDX files for a given package. Uses multiprocessing to process files in parallel.
248248
249249
Args:
250250
package (`types.ModuleType`): The package where to look for objects to document.
@@ -269,11 +269,7 @@ def build_mdx_files(package, doc_folder, output_dir, page_info, version_tag_suff
269269
all_errors = []
270270

271271
# Prepare arguments for multiprocessing
272-
package_name = package.__name__ if package else None
273-
file_args = [
274-
(str(file), str(doc_folder), str(output_dir), page_info, version_tag_suffix, package_name)
275-
for file in all_files
276-
]
272+
file_args = [(str(file), str(doc_folder), str(output_dir), page_info, version_tag_suffix) for file in all_files]
277273

278274
# Use multiprocessing to process files in parallel
279275
with Pool() as pool:

0 commit comments

Comments
 (0)