CI: fix flake C413, C414, C416 errors
- [x] closes #29644
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Thanks @jschendel comments addressed we should merge this, i.e. not wait for the postgres thing to get sorted out sure lgtm 

go for it