Flake8/pylint/futurize fixes