diff --git a/Makefile b/Makefile index 2ba06cf..f2ff064 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,9 @@ TARGET_DIRS:=./whispering flake8: find $(TARGET_DIRS) | grep '\.py$$' | xargs flake8 black: - find $(TARGET_DIRS) | grep '\.py$$' | xargs black --diff | diff /dev/null - + find $(TARGET_DIRS) | grep '\.py$$' | xargs black --diff | python ./scripts/check_null.py isort: - find $(TARGET_DIRS) | grep '\.py$$' | xargs isort --diff | diff /dev/null - + find $(TARGET_DIRS) | grep '\.py$$' | xargs isort --diff | python ./scripts/check_null.py pydocstyle: find $(TARGET_DIRS) | grep -v tests | xargs pydocstyle --ignore=D100,D101,D102,D103,D104,D105,D107,D203,D212 pytest: diff --git a/scripts/check_null.py b/scripts/check_null.py new file mode 100644 index 0000000..b797863 --- /dev/null +++ b/scripts/check_null.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import sys + + +def main() -> None: + data = sys.stdin.read() + if len(data) != 0: + sys.exit(1) + + +if __name__ == "__main__": + main()