Skip to content

Commit 1a53ad7

Browse files
check_untyped_defs pandas.io.excel._util
1 parent cce75ec commit 1a53ad7

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

pandas/io/excel/_util.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from typing import List
12
import warnings
23

34
from pandas.compat._optional import import_optional_dependency
@@ -85,7 +86,7 @@ def _excel2num(x):
8586
return index - 1
8687

8788

88-
def _range2cols(areas):
89+
def _range2cols(areas: str) -> List[int]:
8990
"""
9091
Convert comma separated list of column names and ranges to indices.
9192
@@ -106,12 +107,12 @@ def _range2cols(areas):
106107
>>> _range2cols('A,C,Z:AB')
107108
[0, 2, 25, 26, 27]
108109
"""
109-
cols = []
110+
cols: List[int] = []
110111

111112
for rng in areas.split(","):
112113
if ":" in rng:
113-
rng = rng.split(":")
114-
cols.extend(range(_excel2num(rng[0]), _excel2num(rng[1]) + 1))
114+
rng_ = rng.split(":")
115+
cols.extend(range(_excel2num(rng_[0]), _excel2num(rng_[1]) + 1))
115116
else:
116117
cols.append(_excel2num(rng))
117118

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,6 @@ check_untyped_defs=False
276276
[mypy-pandas.io.excel._openpyxl]
277277
check_untyped_defs=False
278278

279-
[mypy-pandas.io.excel._util]
280-
check_untyped_defs=False
281-
282279
[mypy-pandas.io.excel._xlwt]
283280
check_untyped_defs=False
284281

0 commit comments

Comments
 (0)