CI: Make pep8 validation work with multiple files simultaneously
The validation is bottlenecked due to the repeated sys calls, subprocess spawning, and pep8 calls that only validate a single file each. Running the validation on a list of files is approximately as fast as running it on a single file. This PR makes the first step, enabling the pep8 validation of a list of files, but for now still running it only on a single file. It will be followed by a few more PRs. The end result will be a complete refactoring of `validate_docstrings.py`, that will then take about 10 seconds to validate all docstrings.

- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.

@datapythonista 
I'm travelling and I could only revew with the phone, but looks good.

Quick question, would it make sense to use ruff instead of flake8 for this? Thanks for the quick review!

> Quick question, would it make sense to use ruff instead of flake8 for this?

I think it would be slightly faster, but someone would have to configure ruff to behave the same way as we intend flake8 to behave here. On my machine, the whole `code_check.sh docstrings` validation finishes in about 10 seconds, 7s of those are separate calls to `numpydoc.validate` (I put in a PR there that brings this down to 5.5s), and the remaining 3s are split between our `validate.py`and pep8. 

So I think even with ruff we would at best get to 5.5s instead of 8.5s if we keep `numpydoc.validate`. Might still be worth an issue to discuss the (future) role of ruff here and in other places.

 Yep, trying to improve 10s doesn't make sense. I know we are using ruff in the CI nowz bit I didn't check the exact state. The question was more about consistency, I didn't check if we already replaced flake8 with ruff. I see ruff being used as part of the pre-commit hooks. And there it let a docstring error that I introduced in a non-replaced docstring through. It's also replaced flake8 for the docstring formatting, but back when I introduced my error, only the ``code_check.sh`` showed up as failed. This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this. Thanks for the PR but appears there not much appetite for this change so closing