#!/bin/bash -e
flake8 .

cd examples
GIT_ARG="--git-dir ../.git --work-tree .."

# find out modified python files
MOD=$(git $GIT_ARG status -s | grep -E '\.py$'  | grep -E '^ *M|^ *A ' | cut -c 4-)
# git $GIT_ARG status -s | grep -E '\.py$'
flake8 $MOD
