fix up asserted code from flake8