Skip to content

Commit 04dda00

Browse files
committed
Address ruff/codespell failures
1 parent fa6f664 commit 04dda00

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

pandas/core/computation/eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def eval(
204204
205205
By default, with the numexpr engine, the following operations are supported:
206206
207-
- Arthimetic operations: ``+``, ``-``, ``*``, ``/``, ``**``, ``%``
207+
- Arithmetic operations: ``+``, ``-``, ``*``, ``/``, ``**``, ``%``
208208
- Boolean operations: ``|`` (or), ``&`` (and), and ``~`` (not)
209209
- Comparison operators: ``<``, ``<=``, ``==``, ``!=``, ``>=``, ``>``
210210

pandas/io/formats/style_render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ def concatenated_visible_rows(obj):
970970
idx_len = d["index_lengths"].get((lvl, r), None)
971971
if idx_len is not None: # i.e. not a sparsified entry
972972
d["clines"][rn + idx_len].append(
973-
f"\\cline{{{lvln + 1}-{len(visible_index_levels) + data_len}}}"
973+
f"\\cline{{{lvln + 1}-{len(visible_index_levels) + data_len}}}" # noqa: E501
974974
)
975975

976976
def format(

pandas/tests/dtypes/cast/test_downcast.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
(
3434
# This is a judgement call, but we do _not_ downcast Decimal
3535
# objects
36-
np.array([decimal.Decimal(0.0)]),
36+
np.array([decimal.Decimal("0.0")]),
3737
"int64",
38-
np.array([decimal.Decimal(0.0)]),
38+
np.array([decimal.Decimal("0.0")]),
3939
),
4040
(
4141
# GH#45837

pandas/tests/dtypes/test_missing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def test_period(self):
321321

322322
def test_decimal(self):
323323
# scalars GH#23530
324-
a = Decimal(1.0)
324+
a = Decimal("1.0")
325325
assert isna(a) is False
326326
assert notna(a) is True
327327

pandas/tests/io/formats/style/test_style.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ def test_trim(self, df):
933933

934934
def test_export(self, df, styler):
935935
f = lambda x: "color: red" if x > 0 else "color: blue"
936-
g = lambda x, z: f"color: {z}" if x > 0 else f"color: {z}"
936+
g = lambda x, z: f"color: {z}"
937937
style1 = styler
938938
style1.map(f).map(g, z="b").highlight_max()._compute() # = render
939939
result = style1.export()

pandas/tests/tools/test_to_numeric.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def test_numeric_df_columns(columns):
192192
# see gh-14827
193193
df = DataFrame(
194194
{
195-
"a": [1.2, decimal.Decimal(3.14), decimal.Decimal("infinity"), "0.1"],
195+
"a": [1.2, decimal.Decimal("3.14"), decimal.Decimal("infinity"), "0.1"],
196196
"b": [1.0, 2.0, 3.0, 4.0],
197197
}
198198
)
@@ -207,10 +207,10 @@ def test_numeric_df_columns(columns):
207207
"data,exp_data",
208208
[
209209
(
210-
[[decimal.Decimal(3.14), 1.0], decimal.Decimal(1.6), 0.1],
210+
[[decimal.Decimal("3.14"), 1.0], decimal.Decimal("1.6"), 0.1],
211211
[[3.14, 1.0], 1.6, 0.1],
212212
),
213-
([np.array([decimal.Decimal(3.14), 1.0]), 0.1], [[3.14, 1.0], 0.1]),
213+
([np.array([decimal.Decimal("3.14"), 1.0]), 0.1], [[3.14, 1.0], 0.1]),
214214
],
215215
)
216216
def test_numeric_embedded_arr_likes(data, exp_data):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,5 +746,5 @@ exclude_lines = [
746746
directory = "coverage_html_report"
747747

748748
[tool.codespell]
749-
ignore-words-list = "blocs, coo, hist, nd, sav, ser, recuse, nin, timere, expec, expecs, indext, SME, NotIn, tructures, tru"
749+
ignore-words-list = "blocs, coo, hist, nd, sav, ser, recuse, nin, timere, expec, expecs, indext, SME, NotIn, tructures, tru, indx, abd, ABD"
750750
ignore-regex = 'https://([\w/\.])+'

0 commit comments

Comments
 (0)