swydd/tasks.py

16 lines
239 B
Python
Raw Normal View History

2024-03-05 13:52:37 -06:00
#!/usr/bin/env python3
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()