Skip to content

Upgrade codespell version and fix misspelled words #48364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.2.1
hooks:
- id: codespell
types_or: [python, rst, markdown]
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ def quantile(self, q=0.5, **kwargs):
Return a DataFrame, where the columns are the columns of self,
and the values are the quantiles.
DataFrameGroupBy.quantile
Return a DataFrame, where the coulmns are groupby columns,
Return a DataFrame, where the columns are groupby columns,
and the values are its quantiles.
"""
return self._downsample("quantile", q=q, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ def to_latex(
``display_value`` with the default structure:
``\<command><options> <display_value>``.
Where there are multiple commands the latter is nested recursively, so that
the above example highlighed cell is rendered as
the above example highlighted cell is rendered as
``\cellcolor{red} \bfseries 4``.

Occasionally this format does not suit the applied command, or
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/parsers/python_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ def __next__(self) -> list[str]:
else:
line = next(self.f) # type: ignore[arg-type]
# Note: 'colspecs' is a sequence of half-open intervals.
return [line[fromm:to].strip(self.delimiter) for (fromm, to) in self.colspecs]
return [line[from_:to].strip(self.delimiter) for (from_, to) in self.colspecs]


class FixedWidthFieldParser(PythonParser):
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/arrays/categorical/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def test_constructor_str_unknown(self):
Categorical([1, 2], dtype="foo")

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

Expand Down
6 changes: 3 additions & 3 deletions pandas/tests/arrays/string_/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ def test_mul(dtype, request):
@pytest.mark.xfail(reason="GH-28527")
def test_add_strings(dtype):
arr = pd.array(["a", "b", "c", "d"], dtype=dtype)
df = pd.DataFrame([["t", "u", "v", "w"]])
df = pd.DataFrame([["t", "y", "v", "w"]])
assert arr.__add__(df) is NotImplemented

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

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


Expand Down
12 changes: 6 additions & 6 deletions pandas/tests/config/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def setup_class(cls):
from copy import deepcopy

cls.cf = cf
cls.gc = deepcopy(getattr(cls.cf, "_global_config"))
cls.do = deepcopy(getattr(cls.cf, "_deprecated_options"))
cls.ro = deepcopy(getattr(cls.cf, "_registered_options"))
cls._global_config = deepcopy(getattr(cls.cf, "_global_config"))
cls._deprecated_options = deepcopy(getattr(cls.cf, "_deprecated_options"))
cls._registered_options = deepcopy(getattr(cls.cf, "_registered_options"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to change cls.ro and took the liberty to do the same with the others to keep a standard


def setup_method(self):
setattr(self.cf, "_global_config", {})
Expand All @@ -31,9 +31,9 @@ def setup_method(self):
self.cf.register_option("chained_assignment", "raise")

def teardown_method(self):
setattr(self.cf, "_global_config", self.gc)
setattr(self.cf, "_deprecated_options", self.do)
setattr(self.cf, "_registered_options", self.ro)
setattr(self.cf, "_global_config", self._global_config)
setattr(self.cf, "_deprecated_options", self._deprecated_options)
setattr(self.cf, "_registered_options", self._registered_options)

def test_api(self):

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ exclude =
doc/source/getting_started/comparison/includes/*.rst

[codespell]
ignore-words-list = ba,blocs,coo,hist,nd,sav,ser
ignore-words-list = blocs,coo,hist,nd,sav,ser,recuse
ignore-regex = https://([\w/\.])+

[coverage:run]
Expand Down