swydd/tasks.py

18 lines
285 B
Python
Raw Normal View History

2024-03-05 13:52:37 -06:00
#!/usr/bin/env python3
2024-03-08 12:54:35 -06:00
__import__("sys").path.append("src") # noqa
2024-03-05 13:52:37 -06:00
import swydd as s
@s.task
@s.option("types", "also run mypy")
2024-03-05 13:52:37 -06:00
def check(types: bool = False):
"""run pre-commit (and mypy)"""
s.sh("pre-commit run --all")
if types:
s.sh("mypy src/")
s.cli()