Skip to content

Commit 8b40beb

Browse files
committed
mypy fixes
1 parent 3ee4012 commit 8b40beb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/core/generic.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3385,8 +3385,10 @@ def to_latex(
33853385

33863386
from pandas.io.formats.style import Styler
33873387

3388+
# error: Argument 1 to "Styler" has incompatible type "NDFrame"; expected
3389+
# "Union[DataFrame, Series]"
33883390
styler = Styler(
3389-
self if self.ndim > 1 else self.to_frame(),
3391+
self, # type: ignore[arg-type]
33903392
uuid="",
33913393
formatter=formatter,
33923394
na_rep=na_rep,
@@ -3397,7 +3399,7 @@ def to_latex(
33973399
)
33983400

33993401
for ax in [0, 1]: #
3400-
fmt: callable | str | None = None
3402+
fmt: Callable | str | None = None
34013403
if isinstance(formatter, dict):
34023404
fmt = formatter.get("__index__" if ax == 0 else "__columns__")
34033405
styler.format_index(

0 commit comments

Comments
 (0)