mirror of https://github.com/encode/starlette.git
18 lines
550 B
Bash
Executable File
18 lines
550 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
export PREFIX=""
|
|
if [ -d 'venv' ] ; then
|
|
export PREFIX="venv/bin/"
|
|
fi
|
|
export SOURCE_FILES="starlette tests"
|
|
|
|
set -x
|
|
|
|
./scripts/sync-version
|
|
${PREFIX}ruff format --check --diff $SOURCE_FILES
|
|
# TODO: Use `[[tool.mypy.overrides]]` on the `pyproject.toml` when the mypy issue is solved:
|
|
# github.com/python/mypy/issues/10045. Check github.com/encode/starlette/pull/2180 for more info.
|
|
${PREFIX}mypy starlette
|
|
${PREFIX}mypy tests --disable-error-code no-untyped-def --disable-error-code no-untyped-call
|
|
${PREFIX}ruff check $SOURCE_FILES
|