Bump flake8 version in pre-commit-config.yaml
The flake8 version used in pre-commit-config.yaml seems to emit spurious errors when there are mypy comments for ignoring specific kinds of type errors. Bumping to the latest version of flake8 seems to fix this.

```
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

pandas/core/generic.py:701:36: F821 undefined name 'ignore'
pandas/core/generic.py:701:36: F821 undefined name 'arg'
pandas/core/generic.py:4220:39: F723 syntax error in type comment 'ignore[return-value, arg-type]'
pandas/core/generic.py:4283:39: F723 syntax error in type comment 'ignore[return-value, arg-type]'
```

For reference this is line 701 that it's complaining about:
```python
            new_values, *new_axes  # type: ignore[arg-type]
```

ref https://github.com/PyCQA/pyflakes/pull/455
So we are actually pinning flake8 to an older version (https://github.com/pandas-dev/pandas/issues/34150) for the code checks. But it seems that most issues have been resolved (eg https://github.com/pandas-dev/pandas/pull/34152), only the flake8-rst compatibility not yet. But that is something we don't need to care about for pre-commit. So updating here should be good.