Browse Source

Use black if we can, mention it in the contributing guide (#328)

pull/326/head
parent
commit
ba289937bf
Signed by: hristoast GPG Key ID: 5FC7664AD47AA1C5
3 changed files with 6 additions and 2 deletions
  1. +2
    -2
      CONTRIBUTING.md
  2. +3
    -0
      Makefile
  3. +1
    -0
      requirements.txt

+ 2
- 2
CONTRIBUTING.md View File

@ -80,9 +80,9 @@ After a short time, a chrome or chromium instance will pop up with a note about
controlled by software. After a bit more time it will close and then firefox will open
and do the same. This is normal and part of the test suite.
### Source linting
### Source formatting
Source linting happens as part of the `make test` target.
Source is automatically formatted as part of the `make test` target, using python black.
### Buildbot


+ 3
- 0
Makefile View File

@ -61,6 +61,9 @@ start-xvfb-ci:
test:
ifndef SKIPTESTS
ifneq (, $(shell which black))
black $(proj_dir)
endif
sudo -u momwdb dropdb test_momwdb || echo test db is gone
$(proj_dir)/momw/manage.py test chroniko.tests momw.tests utilz.tests
endif


+ 1
- 0
requirements.txt View File

@ -1,4 +1,5 @@
beautifulsoup4==4.6.0
black
Django==2.2.1
django-csp==3.4
django-debug-toolbar


Loading…
Cancel
Save