Skip to content

Commit 7574fc2

Browse files
committed
Comply with PR comment's requested changes
1 parent 27145bb commit 7574fc2

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

pandas/io/parsers/python_parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ def __next__(self) -> list[str]:
12721272
else:
12731273
line = next(self.f) # type: ignore[arg-type]
12741274
# Note: 'colspecs' is a sequence of half-open intervals.
1275-
return [line[fromm:to].strip(self.delimiter) for (fromm, to) in self.colspecs]
1275+
return [line[from_:to].strip(self.delimiter) for (from_, to) in self.colspecs]
12761276

12771277

12781278
class FixedWidthFieldParser(PythonParser):

pandas/tests/arrays/string_/test_string.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@ def test_mul(dtype, request):
178178
@pytest.mark.xfail(reason="GH-28527")
179179
def test_add_strings(dtype):
180180
arr = pd.array(["a", "b", "c", "d"], dtype=dtype)
181-
df = pd.DataFrame([["t", "u", "v", "w"]])
181+
df = pd.DataFrame([["t", "y", "v", "w"]])
182182
assert arr.__add__(df) is NotImplemented
183183

184184
result = arr + df
185-
expected = pd.DataFrame([["at", "bu", "cv", "dw"]]).astype(dtype)
185+
expected = pd.DataFrame([["at", "by", "cv", "dw"]]).astype(dtype)
186186
tm.assert_frame_equal(result, expected)
187187

188188
result = df + arr
189-
expected = pd.DataFrame([["ta", "ub", "vc", "wd"]]).astype(dtype)
189+
expected = pd.DataFrame([["ta", "yb", "vc", "wd"]]).astype(dtype)
190190
tm.assert_frame_equal(result, expected)
191191

192192

pandas/tests/config/test_config.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ def setup_class(cls):
1414
from copy import deepcopy
1515

1616
cls.cf = cf
17-
cls.gc = deepcopy(getattr(cls.cf, "_global_config"))
18-
cls.do = deepcopy(getattr(cls.cf, "_deprecated_options"))
19-
cls.ro = deepcopy(getattr(cls.cf, "_registered_options"))
17+
cls._global_config = deepcopy(getattr(cls.cf, "_global_config"))
18+
cls._deprecated_options = deepcopy(getattr(cls.cf, "_deprecated_options"))
19+
cls._registered_options = deepcopy(getattr(cls.cf, "_registered_options"))
2020

2121
def setup_method(self):
2222
setattr(self.cf, "_global_config", {})
@@ -31,9 +31,9 @@ def setup_method(self):
3131
self.cf.register_option("chained_assignment", "raise")
3232

3333
def teardown_method(self):
34-
setattr(self.cf, "_global_config", self.gc)
35-
setattr(self.cf, "_deprecated_options", self.do)
36-
setattr(self.cf, "_registered_options", self.ro)
34+
setattr(self.cf, "_global_config", self._global_config)
35+
setattr(self.cf, "_deprecated_options", self._deprecated_options)
36+
setattr(self.cf, "_registered_options", self._registered_options)
3737

3838
def test_api(self):
3939

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ exclude =
178178
doc/source/getting_started/comparison/includes/*.rst
179179

180180
[codespell]
181-
ignore-words-list = ba,blocs,coo,hist,nd,sav,ser,bu,ro,recuse,fromm
181+
ignore-words-list = blocs,coo,hist,nd,sav,ser,recuse
182182
ignore-regex = https://([\w/\.])+
183183

184184
[coverage:run]

0 commit comments

Comments
 (0)