Many linting fixes
Under task: BB-3956
Due to the way prospector 1.1.4 is calling pycodestyle (the name of the pep8 tool) currently only two thirds of the .py files are checked for PEP8 issues during make test.quality. There are not many types of errors, mostly extra or missing blank lines.
It can be tested now running this:
pycodestyle --max-line-length=120 --exclude .venv,frontend,migrations,.git,deploy .
This PR contains autopep8 fixes across the tree, and in addition pylint exceptions/fixes added for which newer versions of pylint or pycodestyle complain.
Another PR will include upgrades to prospector and its tools to newer versions compatible with python 3.8, but which complain about the fixes addressed in this PR.