STYLE: upgrade flake8 to version 4+
- [x] closes #45051 
- [x] tests 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
- [x] bumping version of flake8 and update repo url

Sorry I'm unfamiliar with the  `pre-commit run --show-diff-on-failure --color=always --all-files` command, which I'm failing. It even fails when i run it locally on the master branch. Can someone explain it to me? Sorry, I'm new to this.