ghub/tasks.py
Tyrel Souza f1748276e3 black
2021-11-05 00:34:19 -04:00

27 lines
392 B
Python

from invoke import task
from cli import main
@task
def run(c):
main()
@task
def test(c):
c.run("pytest --cov=. *_tests.py")
@task(pre=[test])
def coverage(c):
c.run("coverage html")
c.run("xdg-open coverage_html_report/index.html")
@task
def black(c):
"""
Runs The uncompromising Python code formatter on specific python files.
"""
c.run("black *.py")