LINT: Adding scripts directory to lint, and fixing flake issues on them (#18949)
- [X] closes #18949
- [ ] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
