DOC: Fixes to the docs style
Fixing flake8 errors in documentation pages that are mostly correct. Also changing `setup.cfg` to avoid false positives.

- [X] refs #24173
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

