Skip to content

Commit 648c113

Browse files
committed
mypy add type: ignore[assignment]
1 parent 0807828 commit 648c113

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/core/reshape/pivot.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,8 @@ def pivot_table(
148148
table = table.sort_index(axis=1)
149149

150150
if fill_value is not None:
151-
filled = table.fillna(value=fill_value, downcast="infer")
152-
assert filled is not None # needed for mypy
153-
table = filled
151+
table = table.fillna(fill_value, downcast="infer") # type: ignore[assignment]
152+
assert isinstance(table, DataFrame)
154153

155154
if margins:
156155
if dropna:

0 commit comments

Comments
 (0)