forked from stlehmann/pyads
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lint.py
31 lines (22 loc) · 771 Bytes
/
lint.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""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-07-13 10:27:58
"""
import click
import subprocess
PACKAGE_NAME = 'pyads'
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'))