fixup: fix assertion message and pep8 cleanup