diff --git a/tasks.py b/tasks.py index c4ef2eb..6e247e2 100644 --- a/tasks.py +++ b/tasks.py @@ -4,27 +4,30 @@ from invoke import task -if os.name == 'nt': # Windows - py = "python" +if os.name == "nt": # Windows + py = "python" else: - py = "python3" + py = "python3" + @task def coverage(c, details=False): - c.run("coverage erase") - c.run("coverage run -m pytest") - if details: - c.run("coverage html && coverage annotate") - c.run("coverage report", pty=True) + c.run("coverage erase") + c.run("coverage run -m pytest") + if details: + c.run("coverage html") + c.run("coverage report", pty=True) + @task def test(c): - coverage(c) + coverage(c) + @task def lint(c): - run_arg = "pylint -j 4 qt_range_slider/__init__.py example.py tests/" - if os.name == 'nt': # Windows - c.run(run_arg) - else: - c.run(run_arg, pty=True) + run_arg = "pylint -j 4 qt_range_slider/__init__.py example.py tests/" + if os.name == "nt": # Windows + c.run(run_arg) + else: + c.run(run_arg, pty=True)