TYPING: some type hints for pandas\io\common.py
On hindsight, i shouldn't have used cast... i was just avoiding adding a ignore.

I think in this case, since a TypeError is raised at runtime, an ignore should have been used for the static check. some changes so that one of the errors is now
`pandas\io\formats\format.py:911: error: Argument 1 to "buffer_put_lines" has incompatible type "Union[str, Path, IO[str]]"; expected "IO[str]"`

instead of
`pandas\io\formats\format.py:905: error: Argument 1 to "buffer_put_lines" has incompatible type "Union[str, Path, IO[Any]]"; expected "TextIO"`

still needs a `# type: ignore` anyway because of the usage of `hasattr`
 small comments, @WillAyd  Thanks @simonjayhawkins 