Skip to content

Commit 80ebbe9

Browse files
authored
Fix regex for forbidden import detection
1 parent 26e77e1 commit 80ebbe9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/check-file-contents.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
echo ""
9797
9898
set +e
99-
FILES_WITH_FORBIDDEN_IMPORT=$(grep -lE '^from.*cli.*import.*$' $CHANGED_FILES)
99+
FILES_WITH_FORBIDDEN_IMPORT=$(grep -lE '^from\s+([^ ]*\.)?cli(\s|\.)' $CHANGED_FILES)
100100
GREP_EXIT_CODE=$?
101101
set -e
102102
@@ -110,4 +110,4 @@ jobs:
110110
fi
111111
else
112112
echo "✅ No relevant Python files found."
113-
fi
113+
fi

0 commit comments

Comments
 (0)