mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
flake8 hook fix (#15693)
Summary: This PR bypasses checking the user's configuration entirely and always use strict, since the CI considers it a hard failure if you can't pass flake8. Pull Request resolved: https://github.com/pytorch/pytorch/pull/15693 Differential Revision: D13574889 Pulled By: suo fbshipit-source-id: f5e1c5731cc49b6223b415317033c275bc7d4fec
This commit is contained in:
committed by
Facebook Github Bot
parent
2403135257
commit
dcbc4f32db
@ -5,7 +5,7 @@ from flake8.main import git
|
||||
if __name__ == '__main__':
|
||||
sys.exit(
|
||||
git.hook(
|
||||
strict=git.config_for('strict'),
|
||||
strict=True,
|
||||
lazy=git.config_for('lazy'),
|
||||
)
|
||||
)
|
||||
|
@ -1,11 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Running pre-commit flake8"
|
||||
FLAKE8_OUT=$(python tools/flake8_hook.py)
|
||||
if [[ ${FLAKE8_OUT} ]]
|
||||
then
|
||||
echo "${FLAKE8_OUT}"
|
||||
exit 1
|
||||
fi
|
||||
python tools/flake8_hook.py
|
||||
|
||||
if [ $(which clang-tidy) ]
|
||||
then
|
||||
|
Reference in New Issue
Block a user