mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-17 12:50:35 +08:00
lint things
Summary: Lint related fixes: Improve internal/OSS consistency. Fix the fight between black and certain pyre-ignore markers by moving them to the line before. Use clang-format-8 automatically if present. Small number of pyre fixes. arc doesn't run pyre at the moment, so I put back the explicit call to pyre. I don't know if there's an option somewhere to change this. Reviewed By: nikhilaravi Differential Revision: D19780518 fbshipit-source-id: ef1c243392322fa074130f6cff2dd8a6f7738a7f
This commit is contained in:
committed by
Facebook Github Bot
parent
9e21659fc5
commit
e491efb81f
@@ -13,7 +13,7 @@
|
||||
}
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
DIR="${DIR}/.."
|
||||
DIR=$(dirname "${DIR}")
|
||||
|
||||
echo "Running isort..."
|
||||
isort -y -sp "${DIR}"
|
||||
@@ -25,6 +25,15 @@ echo "Running flake..."
|
||||
flake8 "${DIR}"
|
||||
|
||||
echo "Running clang-format ..."
|
||||
find "${DIR}" -regex ".*\.\(cpp\|c\|cc\|cu\|cuh\|cxx\|h\|hh\|hpp\|hxx\|tcc\|mm\|m\)" -print0 | xargs -0 clang-format -i
|
||||
clangformat=$(command -v clang-format-8 || echo clang-format)
|
||||
find "${DIR}" -regex ".*\.\(cpp\|c\|cc\|cu\|cuh\|cxx\|h\|hh\|hpp\|hxx\|tcc\|mm\|m\)" -print0 | xargs -0 "${clangformat}" -i
|
||||
|
||||
(cd "${DIR}"; command -v arc > /dev/null && arc lint) || true
|
||||
# (cd "${DIR}"; command -v arc > /dev/null && arc lint) || true
|
||||
|
||||
# Run pyre internally only.
|
||||
if [[ -f tests/TARGETS ]]
|
||||
then
|
||||
echo "Running pyre..."
|
||||
echo "To restart/kill pyre server, run 'pyre restart' or 'pyre kill' in fbcode/"
|
||||
( cd ~/fbsource/fbcode; pyre -l vision/fair/pytorch3d/ )
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user