mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-17 12:50:35 +08:00
don't check black version
Summary: skip checking the version of black because `black --version` looks different in different versions. Reviewed By: kjchalup Differential Revision: D36441262 fbshipit-source-id: a2d9a5cad4f5433909fb85bc9a584e91a2b72601
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f632c423ef
commit
cd7b885169
@@ -7,18 +7,6 @@
|
||||
|
||||
# Run this script at project root by "./dev/linter.sh" before you commit
|
||||
|
||||
{
|
||||
V=$(black --version|cut '-d ' -f3)
|
||||
code='import distutils.version; assert "19.3" < distutils.version.LooseVersion("'$V'")'
|
||||
PYTHON=false
|
||||
command -v python > /dev/null && PYTHON=python
|
||||
command -v python3 > /dev/null && PYTHON=python3
|
||||
${PYTHON} -c "${code}" 2> /dev/null
|
||||
} || {
|
||||
echo "Linter requires black 19.3b0 or higher!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
DIR=$(dirname "${DIR}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user