Skip to content

Commit

Permalink
TYP/CLN: update setup.cfg (pandas-dev#42500)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjayhawkins authored Jul 12, 2021
1 parent 5831b06 commit afd5c18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
12 changes: 2 additions & 10 deletions pandas/io/formats/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,15 @@ def _join_multiline(self, strcols_input: Iterable[list[str]]) -> str:

if self.fmt.index:
idx = strcols.pop(0)
# error: Argument 1 to "__call__" of "_NumberOp" has incompatible type
# "None"; expected "Union[int, float, complex, number, bool_]"
# error: Incompatible types in assignment (expression has type "number",
# variable has type "Optional[int]")
lwidth -= ( # type: ignore[assignment,arg-type]
np.array([self.adj.len(x) for x in idx]).max() + adjoin_width
)
lwidth -= np.array([self.adj.len(x) for x in idx]).max() + adjoin_width

col_widths = [
np.array([self.adj.len(x) for x in col]).max() if len(col) > 0 else 0
for col in strcols
]

assert lwidth is not None
# error: Argument 1 to "_binify" has incompatible type "List[object]"; expected
# "List[int]"
col_bins = _binify(col_widths, lwidth) # type: ignore[arg-type]
col_bins = _binify(col_widths, lwidth)
nbins = len(col_bins)

if self.fmt.is_truncated_vertically:
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ check_untyped_defs = False
[mypy-pandas.io.clipboard]
check_untyped_defs = False

[mypy-pandas.io.formats.string]
ignore_errors = True

[mypy-pandas.tests.apply.test_series_apply]
ignore_errors = True

Expand Down

0 comments on commit afd5c18

Please sign in to comment.