PEP 8 fixes

PEP 8 fixes for mypy/codec/* and mypy/test/* files. The mypy/test/data/* folder is not included.