<commit_before>#!/usr/bin/env bash

set -e
set -x

export VERSION_SCRIPT="import sys; print('%s.%s' % sys.version_info[0:2])"
export PYTHON_VERSION=`python -c "$VERSION_SCRIPT"`

# Remove temporary DB
if [ -f ./test.db ]; then
    rm ./test.db
fi

export PYTHONPATH=./docs/src
pytest --cov=fastapi --cov=tests --cov=docs/src --cov-report=term-missing ${@}
mypy fastapi --disallow-untyped-defs --follow-imports=skip
if [ "${PYTHON_VERSION}" = '3.7' ]; then
    echo "Skipping 'black' on 3.7. See issue https://github.com/ambv/black/issues/494"
else
    black fastapi tests --check
fi
isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --check-only --thirdparty fastapi fastapi tests<commit_msg>:art: Reenable Black --check for Python 3.7 (#229)<commit_after>#!/usr/bin/env bash

set -e
set -x

export VERSION_SCRIPT="import sys; print('%s.%s' % sys.version_info[0:2])"
export PYTHON_VERSION=`python -c "$VERSION_SCRIPT"`

# Remove temporary DB
if [ -f ./test.db ]; then
    rm ./test.db
fi

export PYTHONPATH=./docs/src
pytest --cov=fastapi --cov=tests --cov=docs/src --cov-report=term-missing ${@}
mypy fastapi --disallow-untyped-defs --follow-imports=skip
black fastapi tests --check
isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --check-only --thirdparty fastapi fastapi tests
{'fraction_non_alphanumeric': 0.17258883248730963, 'fraction_numerical': 0.01740391588107324, 'mean_word_length': 3.6308724832214767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '1405375', 'n_tokens_mistral': 534, 'n_tokens_neox': 510, 'n_words': 126}