File tree 2 files changed +5
-7
lines changed
2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change
1
+ from typing import List
1
2
import warnings
2
3
3
4
from pandas .compat ._optional import import_optional_dependency
@@ -85,7 +86,7 @@ def _excel2num(x):
85
86
return index - 1
86
87
87
88
88
- def _range2cols (areas ) :
89
+ def _range2cols (areas : str ) -> List [ int ] :
89
90
"""
90
91
Convert comma separated list of column names and ranges to indices.
91
92
@@ -106,12 +107,12 @@ def _range2cols(areas):
106
107
>>> _range2cols('A,C,Z:AB')
107
108
[0, 2, 25, 26, 27]
108
109
"""
109
- cols = []
110
+ cols : List [ int ] = []
110
111
111
112
for rng in areas .split ("," ):
112
113
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 ))
115
116
else :
116
117
cols .append (_excel2num (rng ))
117
118
Original file line number Diff line number Diff line change @@ -276,9 +276,6 @@ check_untyped_defs=False
276
276
[mypy-pandas.io.excel._openpyxl]
277
277
check_untyped_defs =False
278
278
279
- [mypy-pandas.io.excel._util]
280
- check_untyped_defs =False
281
-
282
279
[mypy-pandas.io.excel._xlwt]
283
280
check_untyped_defs =False
284
281
You can’t perform that action at this time.
0 commit comments