<commit_before>#!/bin/bash

# TODO: run separately until https://github.com/google/pytype/issues/133 is fixed.
# TODO: until 3.6 safe, force 3.5
PYV="3.5"
FAUCETHOME=`dirname $0`"/../.."
TMPDIR=`mktemp -d -p /var/tmp`
CONFIG="$FAUCETHOME/setup.cfg"
PARARGS="parallel --delay 1 --bar"
PYTYPE=`which pytype`
PYTYPEARGS="python$PYV $PYTYPE --config $CONFIG -o $TMPDIR"
PYHEADER=`head -1 $PYTYPE`
SRCFILES="$FAUCETHOME/tests/codecheck/src_files.sh"
echo "Using $PYTYPE (header $PYHEADER)"

$SRCFILES | shuf | $PARARGS $PYTYPEARGS || exit 1
rm -rf $TMPDIR<commit_msg>Bail out of pytype early if one fails.<commit_after>#!/bin/bash

# TODO: run separately until https://github.com/google/pytype/issues/133 is fixed.
# TODO: until 3.6 safe, force 3.5
PYV="3.5"
FAUCETHOME=`dirname $0`"/../.."
TMPDIR=`mktemp -d -p /var/tmp`
CONFIG="$FAUCETHOME/setup.cfg"
PARARGS="parallel --delay 1 --bar --halt now,fail=1"
PYTYPE=`which pytype`
PYTYPEARGS="python$PYV $PYTYPE --config $CONFIG -o $TMPDIR"
PYHEADER=`head -1 $PYTYPE`
SRCFILES="$FAUCETHOME/tests/codecheck/src_files.sh"
echo "Using $PYTYPE (header $PYHEADER)"

$SRCFILES | shuf | $PARARGS $PYTYPEARGS || exit 1
rm -rf $TMPDIR
{'fraction_non_alphanumeric': 0.17566409597257926, 'fraction_numerical': 0.02313624678663239, 'mean_word_length': 4.697560975609756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4521958', 'n_tokens_mistral': 473, 'n_tokens_neox': 452, 'n_words': 112}