<commit_before>#!/bin/bash -e

if [[ ! -x $(which flake8) ]]; then
  echo "fatal: flake8 not found on $PATH. Exiting."
  exit 1
fi

if [[ $FLAKE == "true" ]]; then
  find html5lib/ -name '*.py' -and -not -name 'constants.py' -print0 | xargs -0 flake8 --ignore=E501
  flake1=$?
  flake8 --max-line-length=99 --ignore=E126 html5lib/constants.py
  flake2=$?<commit_msg>Make flake8-run.sh only require FLAKE=true if TRAVIS=true.<commit_after>#!/bin/bash -e

if [[ ! -x $(which flake8) ]]; then
  echo "fatal: flake8 not found on $PATH. Exiting."
  exit 1
fi

if [[ $TRAVIS != "true" || $FLAKE == "true" ]]; then
  find html5lib/ -name '*.py' -and -not -name 'constants.py' -print0 | xargs -0 flake8 --ignore=E501
  flake1=$?
  flake8 --max-line-length=99 --ignore=E126 html5lib/constants.py
  flake2=$?
{'fraction_non_alphanumeric': 0.18546365914786966, 'fraction_numerical': 0.04887218045112782, 'mean_word_length': 3.295698924731183, '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': '6291203', 'n_tokens_mistral': 346, 'n_tokens_neox': 330, 'n_words': 89}