<commit_before>directories="f8a_jobs"
separate_files="f8a-jobs.py setup.py"
fail=0

function prepare_venv() {
    virtualenv -p python3 venv && source venv/bin/activate && python3 `which pip3` install pycodestyle
}

echo "----------------------------------------------------"
echo "Running Python linter against following directories:"
echo $directories
echo "----------------------------------------------------"
echo

ls -1

[ "$NOVENV" == "1" ] || prepare_venv || exit 1

# checks for the whole directories
for directory in $directories
do
    files=`find $directory -path $directory/venv -prune -o -name '*.py' -print`

    for source in $files
    do
        echo $source
        pycodestyle $source
        if [ $? -eq 0 ]
        then
            echo "    Pass"
        else
            echo "    Fail"
            let "fail++"
        fi
    done
done


echo
echo "----------------------------------------------------"
echo "Running Python linter against selected files:"
echo $separate_files<commit_msg>Removed leftover made during testing the script<commit_after>directories="f8a_jobs"
separate_files="f8a-jobs.py setup.py"
fail=0

function prepare_venv() {
    virtualenv -p python3 venv && source venv/bin/activate && python3 `which pip3` install pycodestyle
}

echo "----------------------------------------------------"
echo "Running Python linter against following directories:"
echo $directories
echo "----------------------------------------------------"
echo

[ "$NOVENV" == "1" ] || prepare_venv || exit 1

# checks for the whole directories
for directory in $directories
do
    files=`find $directory -path $directory/venv -prune -o -name '*.py' -print`

    for source in $files
    do
        echo $source
        pycodestyle $source
        if [ $? -eq 0 ]
        then
            echo "    Pass"
        else
            echo "    Fail"
            let "fail++"
        fi
    done
done


echo
echo "----------------------------------------------------"
echo "Running Python linter against selected files:"
echo $separate_files
{'fraction_non_alphanumeric': 0.23623964929371652, 'fraction_numerical': 0.009254749147588894, 'mean_word_length': 1.5901639344262295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '599726', 'n_tokens_mistral': 562, 'n_tokens_neox': 541, 'n_words': 181}