Develop pre check
- [ x] closes #37957
- [ ] tests added / passed
- [ x passes `black pandas`
- [ x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Hey @MarcoGorell and @jreback I added my changes to the existing check, implementing a wildcard. This PR should be ready for final review.

In addition, I think a great approach to implementing the pre-commit library would be to not only identify problems like we do now, but to fix them automatically. We can do this using the search and replace plugin - https://github.com/mattlqx/pre-commit-search-and-replace.