mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Provide a pre-commit hook that does flake8 and clang tidy checks. Enables the clang-tidy script to run in parallel to make it fast enough to be used in a pre-commit hook. Pull Request resolved: https://github.com/pytorch/pytorch/pull/15102 Reviewed By: soumith Differential Revision: D13429629 Pulled By: zdevito fbshipit-source-id: bd52fe5652f29b033de8d9926d78350b2da4c2fc
12 lines
202 B
Python
Executable File
12 lines
202 B
Python
Executable File
import sys
|
|
|
|
from flake8.main import git
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(
|
|
git.hook(
|
|
strict=git.config_for('strict'),
|
|
lazy=git.config_for('lazy'),
|
|
)
|
|
)
|