Commit Graph

2 Commits

Author SHA1 Message Date
Chris Hill-Scott
b24c23fe3b Lint for print statements
flake8-print is a flake8 plugin that checks for `print()` statements in
Python files.

This should save us having to manually spot these when reviewing pull
requests.

The `--enable=T` flag needs to be set until this bug is fixed:
https://github.com/JBKahn/flake8-print/issues/27
2018-01-05 12:14:28 +00:00
Leo Hemsted
4aeb57567a remove flask-script
flask-script has been deprecated by the internal flask.cli module, but
making this carries a few changes with it

* you should add FLASK_APP=application.py and FLASK_DEBUG=1 to your
  environment.sh.
* instead of using `python app.py runserver`, now you must run
  `flask run -p 6012`. The -p command is important - the port must be
  set before the config is loaded, so that it can live reload nicely.
  (https://github.com/pallets/flask/issues/2113#issuecomment-268014481)
* find available commands by just running `flask`.
* run them using flask. eg `flask list_routes`
* define new tasks by giving them the decorator
  `@app.cli.command('task-name')`. Task name isn't needed if it's just
  the same as the function name. Alternatively, if app isn't available
  in the current scope, you can invoke the decorator directly, as seen
  in app/commands.py
2017-11-06 17:33:04 +00:00