Skip to content

Commit 8ed0ba2

Browse files
lucasdamonoatamir
authored andcommitted
Upgrade codespell version and fix misspelled words (pandas-dev#48364)
* Upgrade codespell version and fix misspelled words * Comply with PR comment's requested changes
1 parent 5a8a64c commit 8ed0ba2

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
hooks:
2323
- id: black
2424
- repo: https://github.com/codespell-project/codespell
25-
rev: v2.1.0
25+
rev: v2.2.1
2626
hooks:
2727
- id: codespell
2828
types_or: [python, rst, markdown]

pandas/core/resample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ def quantile(self, q=0.5, **kwargs):
10451045
Return a DataFrame, where the columns are the columns of self,
10461046
and the values are the quantiles.
10471047
DataFrameGroupBy.quantile
1048-
Return a DataFrame, where the coulmns are groupby columns,
1048+
Return a DataFrame, where the columns are groupby columns,
10491049
and the values are its quantiles.
10501050
"""
10511051
return self._downsample("quantile", q=q, **kwargs)

pandas/io/formats/style.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ def to_latex(
829829
``display_value`` with the default structure:
830830
``\<command><options> <display_value>``.
831831
Where there are multiple commands the latter is nested recursively, so that
832-
the above example highlighed cell is rendered as
832+
the above example highlighted cell is rendered as
833833
``\cellcolor{red} \bfseries 4``.
834834
835835
Occasionally this format does not suit the applied command, or

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/categorical/test_constructors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def test_constructor_str_unknown(self):
450450
Categorical([1, 2], dtype="foo")
451451

452452
def test_constructor_np_strs(self):
453-
# GH#31499 Hastable.map_locations needs to work on np.str_ objects
453+
# GH#31499 Hashtable.map_locations needs to work on np.str_ objects
454454
cat = Categorical(["1", "0", "1"], [np.str_("0"), np.str_("1")])
455455
assert all(isinstance(x, np.str_) for x in cat.categories)
456456

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
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)