Fix operation of /dev/null for Windows

This commit is contained in:
Yuta Hayashibe 2022-10-10 00:36:51 +09:00
parent 9e4b88fb6a
commit 84f8d0dfe7
2 changed files with 15 additions and 2 deletions

View file

@ -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:

13
scripts/check_null.py Normal file
View file

@ -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()