ENH: Use yaml anchors for pre-commit hooks additional dependencies
- [x] closes #43282 
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry


This PR adds:
- use of yaml anchors for the `flake8` and `yesqa` hooks 
- updates to `scripts/sync_flake8_versions.py`  since now both `yesqa` and `flake8` hooks have the same additional dependencies declared through a reusable anchor there is no need to check for sync between these two 


PD. I am not sure this needs a `whatsnew` entry so I did not add it - unless y'all think there should be one