Ignore coverage.py branch coverage for the context manager.
Fix pep8 warning.
Fix some pylint errors/warnings.