fix pep8 issues in api/v3.py