[scripts] pep8 improvements for hg5k