django-orchestra-test/orchestra/management/commands/staticcheck.py
Marc Aymerich 7133bd31ea flake8
2015-04-04 17:44:07 +00:00

13 lines
406 B
Python

from django.core.management.base import BaseCommand
from orchestra.utils.paths import get_orchestra_dir, get_site_dir
from orchestra.utils.system import run
class Command(BaseCommand):
help = "Run flake8 syntax checks."
def handle(self, *filenames, **options):
flake = run('flake8 {%s,%s} | grep -v "W293\|E501"' % (get_orchestra_dir(), get_site_dir()))
print(flake.stdout)