Last active
April 30, 2018 08:51
-
-
Save stlehmann/c638748d4ec6e784f7121ef0a9582b56 to your computer and use it in GitHub Desktop.
Script for linting a Python project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
import subprocess | |
click.echo('\n--- Running Mypy ---') | |
res = subprocess.call(['mypy', '.']) | |
if res == 0: | |
click.echo(click.style('OK', fg='green')) | |
click.echo('\n--- Running Flake8 ---') | |
res = subprocess.call(['flake8']) | |
if res == 0: | |
click.echo(click.style('OK', fg='green')) | |
click.echo('\n--- Running pydocstyle ---') | |
res = subprocess.call(['pydocstyle']) | |
if res == 0: | |
click.echo(click.style('OK', fg='green')) | |
click.echo('\n--- Running Pytest ---') | |
res = subprocess.call(['pytest']) | |
if res == 0: | |
click.echo(click.style('OK', fg='green')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment