updated find_unused_pip_modules.sh

pull/2/head
Hari Sekhon 6 years ago
parent c1bc89c9e9
commit c7e65704cf

@ -45,7 +45,7 @@ while read module; do
# sloooow by comparison to git grep
#grep -R "import[[:space:]]\+$module\|from[[:space:]]\+$module[[:space:]]\+import[[:space:]]\+" . |
if ! \
git grep "import[[:space:]]\+$module\|from[[:space:]]\+$module[[:space:]]\+import[[:space:]]\+" |
git grep "import[[:space:]]\+$module\|from[[:space:]]\+$module\([[:alnum:]\.]\+\)\?[[:space:]]\+import[[:space:]]\+" |
grep -v requirements.txt |
grep -q .; then
echo "$module"

Loading…
Cancel
Save