Fixed flake8 issues for the get_token method