代码拉取完成,页面将自动刷新
#! /bin/env bash
set -e
REPO_ROOT="$(dirname "$0")/.."
PYTHON="${PYTHON:-python3}"
BLACK="${PYTHON} -m black"
ISORT="${PYTHON} -m isort"
if ! ${BLACK} --version >/dev/null 2>&1; then
echo "black is not found, please check it is installed"
exit 1
fi
if ! ${ISORT} --version >/dev/null 2>&1; then
echo "isort is not found, please check it is installed"
exit 1
fi
cd -- "${REPO_ROOT}"
${BLACK} .
# isort is slow at skipping large Git-ignored directories when invoked as `isort .`,
# so pass it an explicit list of files instead.
# isort will only skip files listed in the config file corresponding to the first file
# on the command line, which would normally be cvat-cli/pyproject.toml. Force the first
# file to be manage.py, so that it uses `pyproject.toml` instead.
git ls-files -z --exclude-standard --deduplicate --cached --others '*.py' \
| xargs -0 ${ISORT} --resolve-all-configs --filter-files manage.py
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。