CLN: Replace old string formatting syntax with f-strings for scripts/validate_docstrings.py

- [ ] xref #29547
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
