deploy.py refactor some coding style changes