ghub/tasks.py

26 lines
391 B
Python
Raw Normal View History

2021-11-04 02:26:39 +00:00
from invoke import task
2021-11-04 05:01:35 +00:00
from cli import main
@task
def run(c):
main()
2021-11-04 02:26:39 +00:00
@task
def test(c):
2021-11-05 02:59:03 +00:00
c.run("pytest --cov=. *_tests.py")
2021-11-04 05:01:35 +00:00
2021-11-05 03:03:52 +00:00
@task(pre=[test])
def coverage(c):
c.run("coverage html")
c.run("xdg-open coverage_html_report/index.html")
2021-11-04 02:26:39 +00:00
@task
def black(c):
"""
Runs The uncompromising Python code formatter on specific python files.
"""
c.run("black *.py")