Fix for Windows

This commit is contained in:
Yuta Hayashibe 2022-10-10 00:42:06 +09:00
parent 84f8d0dfe7
commit 177fc3d353
2 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ yamllint:
| xargs yamllint --no-warnings | xargs yamllint --no-warnings
version_check: version_check:
git tag | python ./scripts/check_version.py --toml pyproject.toml -i README.md --tags /dev/stdin git tag | python ./scripts/check_version.py --toml pyproject.toml -i README.md --tags -
lint_python: flake8 black isort pydocstyle version_check pytest lint_python: flake8 black isort pydocstyle version_check pytest

View file

@ -33,7 +33,7 @@ def get_opts() -> argparse.Namespace:
oparser = argparse.ArgumentParser() oparser = argparse.ArgumentParser()
oparser.add_argument("--input", "-i", type=Path) oparser.add_argument("--input", "-i", type=Path)
oparser.add_argument("--toml", "-t", type=Path, required=True) oparser.add_argument("--toml", "-t", type=Path, required=True)
oparser.add_argument("--tags", type=Path) oparser.add_argument("--tags")
return oparser.parse_args() return oparser.parse_args()
@ -47,7 +47,7 @@ def main() -> None:
if opts.tags: if opts.tags:
tags = [] tags = []
if str(opts.tags) == "/dev/stdin": if opts.tags == "-":
for line in sys.stdin: for line in sys.stdin:
tags.append(line[:-1]) tags.append(line[:-1])
else: else: