TYP: fix mypy ignored err in pandas/io/formats/format.py
- [ ] xref #37715
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Handle ignored mypy error in ``pandas/io/formats/format.py``
@simonjayhawkins it's green > @simonjayhawkins it's green

since this is changing code, will wait for 2nd approval.


 LGTM Thanks @ivanovmg 