Skip to content

Commit dcb2b70

Browse files
committed
TYP: assert instead of casting
1 parent 1b9ff3f commit dcb2b70

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/io/formats/format.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,7 @@ def _get_strcols_without_index(self) -> List[List[str]]:
808808
return strcols
809809

810810
if is_list_like(self.header):
811-
# cast here since can't be bool if is_list_like
812-
self.header = cast(List[str], self.header)
811+
assert isinstance(self.header, list)
813812
if len(self.header) != len(self.columns):
814813
raise ValueError(
815814
f"Writing {len(self.columns)} cols "

0 commit comments

Comments
 (0)