From 272492ab858415f558df0636415d7a8fa4ab0026 Mon Sep 17 00:00:00 2001 From: Krishna Date: Tue, 30 Dec 2025 21:57:45 +0530 Subject: [PATCH] Fix regex for forbidden import detection --- .github/workflows/check-file-contents.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-file-contents.yml b/.github/workflows/check-file-contents.yml index 6c02d904c7..38483d3988 100644 --- a/.github/workflows/check-file-contents.yml +++ b/.github/workflows/check-file-contents.yml @@ -96,7 +96,7 @@ jobs: echo "" set +e - FILES_WITH_FORBIDDEN_IMPORT=$(grep -lE '^from.*cli.*import.*$' $CHANGED_FILES) + FILES_WITH_FORBIDDEN_IMPORT=$(grep -lE '^from\s+([^ ]*\.)?cli(\s|\.)' $CHANGED_FILES) GREP_EXIT_CODE=$? set -e @@ -110,4 +110,4 @@ jobs: fi else echo "✅ No relevant Python files found." - fi \ No newline at end of file + fi