Fix typing issues for CI
- [X] closes #42769
- [N/A] tests added / passed
- [X] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [N/A] whatsnew entry

Should allow CI to proceed.