Fix mypy errors tests.dtypes.test_common
xref #28926

- [x] xref #28926
- [x] tests passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

@AbhijeetKrishnan can you rebase @simonjayhawkins Thanks for the review. I will try to see how the code might be refactored to appease mypy. I plan on submitting another PR if I fix it, so this PR can be closed. > I plan on submitting another PR if I fix it, so this PR can be closed.

no need. make updates on same branch and push to keep history. @AbhijeetKrishnan can you rebase @AbhijeetKrishnan can you rebase, this looks about ready Looks like this has now been addressed in https://github.com/pandas-dev/pandas/pull/29179 thanks all the same @AbhijeetKrishnan 