Skip to content

Commit 17ede58

Browse files
authored
TYP: remove ignore from pandas/core/reshape/melt.py (#52580)
remove ignore[assignment] from pandas/core/reshape/melt.py
1 parent 2d5ad57 commit 17ede58

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pandas/core/reshape/melt.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,12 @@ def melt(
128128
id_data = frame.pop(col)
129129
if is_extension_array_dtype(id_data):
130130
if K > 0:
131-
id_data = concat([id_data] * K, ignore_index=True)
131+
mdata[col] = concat([id_data] * K, ignore_index=True)
132132
else:
133133
# We can't concat empty list. (GH 46044)
134-
id_data = type(id_data)([], name=id_data.name, dtype=id_data.dtype)
134+
mdata[col] = type(id_data)([], name=id_data.name, dtype=id_data.dtype)
135135
else:
136-
# error: Incompatible types in assignment (expression has type
137-
# "ndarray[Any, dtype[Any]]", variable has type "Series")
138-
id_data = np.tile(id_data._values, K) # type: ignore[assignment]
139-
mdata[col] = id_data
136+
mdata[col] = np.tile(id_data._values, K)
140137

141138
mcolumns = id_vars + var_name + [value_name]
142139

0 commit comments

Comments
 (0)