#!/bin/bash

# TODO: until 3.6 safe, force 3.5
PYV="3.5"
FAUCETHOME=`dirname $0`"/../.."
PYTHONPATH=$FAUCETHOME:$FAUCETHOME/faucet:$FAUCETHOME/clib
PARARGS="parallel --delay 1 --bar"

PYTYPE=`which pytype`
PYHEADER=`head -1 $PYTYPE`

PYTYPEARGS="python$PYV $PYTYPE --pythonpath $PYTHONPATH -d pyi-error,import-error -V$PYV"
PYHEADER=`head -1 $PYTYPE`
SRCFILES="$FAUCETHOME/tests/codecheck/src_files.sh"
echo "Using $PYTYPE (header $PYHEADER)"

# pre-generate pyi for main FAUCET codebase.
$PYTYPEARGS $FAUCETHOME/faucet/*py
$SRCFILES | shuf | $PARARGS $PYTYPEARGS || exit 1

#!/bin/bash

# TODO: until 3.6 safe, force 3.5
PYV="3.5"
FAUCETHOME=`dirname $0`"/../.."
PYTHONPATH=$FAUCETHOME:$FAUCETHOME/faucet:$FAUCETHOME/clib
PARARGS="parallel --delay 1 --bar"
PYTYPE=`which pytype`
PYTYPEARGS="python$PYV  $PYTYPE --pythonpath $PYTHONPATH -d pyi-error,import-error -V$PYV"
PYHEADER=`head -1 $PYTYPE`
SRCFILES="$FAUCETHOME/tests/codecheck/src_files.sh"
echo "Using $PYTYPE (header $PYHEADER)"

$SRCFILES | shuf | $PARARGS $PYTYPEARGS || exit 1

Revert "Pregenerate pyi for mainline faucet."
Revert "Pregenerate pyi for mainline faucet."

This reverts commit d7d6c08e51da2caded0706de4d81266e1dfdfac7.
