Skip to content

Commit 3fba92e

Browse files
simonjayhawkinsjreback
authored andcommitted
TYPING: fix type annotation for pandas.io.formats.format._binify (#28908)
1 parent 0474c7f commit 3fba92e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/io/formats/format.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,8 @@ def _join_multiline(self, *args) -> str:
868868
np.array([self.adj.len(x) for x in col]).max() if len(col) > 0 else 0
869869
for col in strcols
870870
]
871+
872+
assert lwidth is not None
871873
col_bins = _binify(col_widths, lwidth)
872874
nbins = len(col_bins)
873875

@@ -1890,7 +1892,7 @@ def set_eng_float_format(accuracy: int = 3, use_eng_prefix: bool = False) -> Non
18901892
set_option("display.column_space", max(12, accuracy + 9))
18911893

18921894

1893-
def _binify(cols: List[np.int32], line_width: Union[np.int32, int]) -> List[int]:
1895+
def _binify(cols: List[int], line_width: int) -> List[int]:
18941896
adjoin_width = 1
18951897
bins = []
18961898
curr_width = 0

0 commit comments

Comments
 (0)