From 58cc9c1bd3e32480e76ea80d0aebb2bd403c8e85 Mon Sep 17 00:00:00 2001 From: Asra Date: Wed, 26 Feb 2025 17:09:27 +0000 Subject: [PATCH] docs: de-dupe conversion and other passes Signed-off-by: Asra --- .github/workflows/copy_tblgen_files.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/copy_tblgen_files.py b/.github/workflows/copy_tblgen_files.py index c14fa2f93..237660bdf 100644 --- a/.github/workflows/copy_tblgen_files.py +++ b/.github/workflows/copy_tblgen_files.py @@ -74,16 +74,13 @@ def sort_markdown_file_by_header(path): weight: 70 ---\n""") - print("Processing Non-conversion Passes") - for src_path in glob.glob(f"{SRC_BASE}/**/*Passes.md", recursive=True): - with open(src_path, "r") as src_file: - with open(PASSES_FILE, "a") as dest_file: - dest_file.write(cleanup(src_file.read())) - - print("Processing Conversion Passes") - for src_path in glob.glob( + print("Processing Passes") + passes_files = glob.glob(f"{SRC_BASE}/**/*Passes.md", recursive=True) + conversion_files = glob.glob( f"{SRC_BASE}/Dialect/**/Conversions/**/*.md", recursive=True - ): + ) + for src_path in set(passes_files + conversion_files): + print(src_path) with open(src_path, "r") as src_file: with open(PASSES_FILE, "a") as dest_file: dest_file.write(cleanup(src_file.read()))