django-orchestra-test/orchestra/management/commands/staticcheck.py

13 lines
403 B
Python
Raw Normal View History

2014-09-26 15:05:20 +00:00
from django.core.management.base import BaseCommand
2015-04-04 17:44:07 +00:00
from orchestra.utils.paths import get_orchestra_dir, get_site_dir
2015-04-05 10:46:24 +00:00
from orchestra.utils.sys import run
2014-09-26 15:05:20 +00:00
class Command(BaseCommand):
2015-04-04 17:44:07 +00:00
help = "Run flake8 syntax checks."
2014-09-26 15:05:20 +00:00
def handle(self, *filenames, **options):
2015-04-04 17:44:07 +00:00
flake = run('flake8 {%s,%s} | grep -v "W293\|E501"' % (get_orchestra_dir(), get_site_dir()))
print(flake.stdout)