STY: remove --keep-runtime-typing from pyupgrade Final_Part-5
To fix issue #40759 :
Changes here are from PEP585 (e.g. List[str] -> list[str]) and from PEP604 (Optional[str] -> str | None), both of which are only applied in the presence of from future import annotations. Some imports became unused after this so those have been removed.
As there were changes in many files (97) this has been split up into 5 smaller PRs.
This is the final PR 5 of 5.
Checks in this one will pass only when other parts are merged as --keep-runtime-typing is removed the pyupgrade precommit hook.

Refer the discussion here : #40773

- [x] closes #40759 
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry

@github-actions pre-commit

---

the above hasn't worked - @fathomer could you run pre-commit again please? Thanks @fathomer ! > Thanks @fathomer !

Thanks @MarcoGorelli for all the help and clear details of the task.
Glad to make my first ever open source contribution here! :) 