~hloeung/mojo/force-destroy-model

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: mergebot at canonical
  • Author(s): "Stuart Bishop"
  • Date: 2020-04-22 13:04:02 UTC
  • mfrom: (545.1.6 blacken)
  • Revision ID: mergebot@juju-139df4-prod-is-toolbox-0.canonical.com-20200422130402-55dc5d92dj2lx14h
Reformat code with black

Reviewed-on: https://code.launchpad.net/~stub/mojo/blacken/+merge/382726
Reviewed-by: Tom Haddon <tom.haddon@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        @echo Starting unit tests...
72
72
        @$(PYTHON) /usr/bin/nosetests -e test_container.py $(TESTS)
73
73
 
74
 
lint:
 
74
lint: blacken
75
75
        @echo "Checking for Python syntax (ignoring jujuwait.py which is an external project)..."
76
 
        @python3 -m flake8 --config=/dev/null --max-complexity=30 --max-line-length=131 --hang-closing --exclude='mojo/juju/wait.py,mojo/juju/__init__.py' $(PROJECT) && echo OK
 
76
        @python3 -m flake8 --config=setup.cfg --max-complexity=30 $(PROJECT) && echo OK
77
77
 
78
 
lint-complex:
 
78
lint-complex: blacken
79
79
        @echo "Checking for Python syntax and complexity (ignoring jujuwait.py which is an external project)..."
80
 
        @python3 -m flake8 --config=/dev/null --max-complexity=10 --max-line-length=131 --hang-closing --exclude='mojo/juju/wait.py,mojo/juju/__init__.py' $(PROJECT) && echo OK
 
80
        @python3 -m flake8 --config=setup.cfg --max-complexity=10 $(PROJECT) && echo OK
 
81
 
 
82
blacken:
 
83
        @if [ ! -z `which black` ]; then \
 
84
            echo "Reformatting code with black..."; \
 
85
            find . -name \*.py | grep -v wait.py | xargs -n1 black -l 120 -S; \
 
86
        fi
81
87
 
82
88
run-lxc-test:
83
89
        @echo "Running tests inside an LXC..."