TYP: typing refactor mypy fix
`pandas/io/formats/style.py:168: error: Incompatible types in assignment (expression has type "Union[DataFrame, Series]", variable has type "DataFrame")  [assignment]`

refactor to remove the `assert` statement otherwise needed to solve the above `mypy` error.