update script for PRAW and do some flake8 stuff