Last active
September 23, 2018 08:55
-
-
Save stlehmann/ced804f4a0d6ef3575e52543d5e942f7 to your computer and use it in GitHub Desktop.
Script for linting a Python project
This file contains 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
""" | |
Script for linting the current project. | |
:author: Stefan Lehmann <[email protected]> | |
:license: MIT, see license file or https://opensource.org/licenses/MIT | |
:created on 2018-06-28 15:10:47 | |
:last modified by: Stefan Lehmann | |
:last modified time: 2018-06-28 15:12:56 | |
""" | |
import click | |
import subprocess | |
PACKAGE_NAME = 'app' | |
click.echo('\n--- Running Mypy ---') | |
res = subprocess.call(['mypy', PACKAGE_NAME]) | |
if res == 0: | |
click.echo(click.style('OK', fg='green')) | |
click.echo('\n--- Running Flake8 ---') | |
res = subprocess.call(['flake8', PACKAGE_NAME]) | |
if res == 0: | |
click.echo(click.style('OK', fg='green')) | |
click.echo('\n--- Running pydocstyle ---') | |
res = subprocess.call(['pydocstyle', PACKAGE_NAME]) | |
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