Miscellaneous easy fixes suggested by pylint
This MR offers a selection of safe-looking and simple changes suggested by pylint, plus a pylint configuration that means that the code-base passes pylint. Having a baseline of pylint passing is useful for contributors who can do some extra qa on code before submitting patches.
There is certainly scope to remove more pylint-tag-exclusions from the config and make further changes to the code; however, the changes required become progressively more invasive and the tags are perhaps not so universally accepted.
Is there an appetite for this amount of pylinting on the codebase? Perhaps adding a Contributing document that mentions pylint and maybe even adding it to CI?