Browse Source

Bring flake8 back in for tests (#336)

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

+ 7
- 1
CONTRIBUTING.md View File

@ -80,10 +80,16 @@ 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 formatting
### Source formatting/linting
Source is automatically formatted as part of the `make test` target, using python black. Please ensure it's [installed for your system](https://github.com/python/black#installation).
Linting also happens as part of the test target, be sure the following rules are set at minimum:
[flake8]
ignore = E501, E402, W503
max-line-length = 160
### Buildbot
Any commit to any branch on the primary `Modding-OpenMW.com/momw` repository will kick off


+ 1
- 0
Makefile View File

@ -61,6 +61,7 @@ ifndef SKIPTESTS
ifneq (, $(shell which black))
black $(proj_dir)
endif
find $(proj_dir) -type f -name "*.py" | xargs flake8
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

@ -6,6 +6,7 @@ django-debug-toolbar
django-filter==1.1.0
django-taggit==0.22.2
djangorestframework==3.8.2
flake8
ipython
jedi
Markdown==2.6.11


Loading…
Cancel
Save