Skip to content

Commit e84a7f7

Browse files
[pre-commit.ci] pre-commit autoupdate (#60840)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.4](astral-sh/ruff-pre-commit@v0.8.6...v0.9.4) - [github.com/codespell-project/codespell: v2.3.0 → v2.4.1](codespell-project/codespell@v2.3.0...v2.4.1) - [github.com/PyCQA/isort: 5.13.2 → 6.0.0](PyCQA/isort@5.13.2...6.0.0) - [github.com/pre-commit/mirrors-clang-format: v19.1.6 → v19.1.7](pre-commit/mirrors-clang-format@v19.1.6...v19.1.7) - [github.com/trim21/pre-commit-mirror-meson: v1.6.1 → v1.7.0](trim21/pre-commit-mirror-meson@v1.6.1...v1.7.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Address ruff/codespell failures * Run ruff again --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Matthew Roeschke <[email protected]>
1 parent e58bf26 commit e84a7f7

File tree

90 files changed

+165
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+165
-260
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ci:
1919
skip: [pyright, mypy]
2020
repos:
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.8.6
22+
rev: v0.9.4
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
@@ -41,7 +41,7 @@ repos:
4141
pass_filenames: true
4242
require_serial: false
4343
- repo: https://github.com/codespell-project/codespell
44-
rev: v2.3.0
44+
rev: v2.4.1
4545
hooks:
4646
- id: codespell
4747
types_or: [python, rst, markdown, cython, c]
@@ -70,7 +70,7 @@ repos:
7070
- id: trailing-whitespace
7171
args: [--markdown-linebreak-ext=md]
7272
- repo: https://github.com/PyCQA/isort
73-
rev: 5.13.2
73+
rev: 6.0.0
7474
hooks:
7575
- id: isort
7676
- repo: https://github.com/asottile/pyupgrade
@@ -95,14 +95,14 @@ repos:
9595
- id: sphinx-lint
9696
args: ["--enable", "all", "--disable", "line-too-long"]
9797
- repo: https://github.com/pre-commit/mirrors-clang-format
98-
rev: v19.1.6
98+
rev: v19.1.7
9999
hooks:
100100
- id: clang-format
101101
files: ^pandas/_libs/src|^pandas/_libs/include
102102
args: [-i]
103103
types_or: [c, c++]
104104
- repo: https://github.com/trim21/pre-commit-mirror-meson
105-
rev: v1.6.1
105+
rev: v1.7.0
106106
hooks:
107107
- id: meson-fmt
108108
args: ['--inplace']

asv_bench/benchmarks/io/style.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class Render:
1313
def setup(self, cols, rows):
1414
self.df = DataFrame(
1515
np.random.randn(rows, cols),
16-
columns=[f"float_{i+1}" for i in range(cols)],
17-
index=[f"row_{i+1}" for i in range(rows)],
16+
columns=[f"float_{i + 1}" for i in range(cols)],
17+
index=[f"row_{i + 1}" for i in range(rows)],
1818
)
1919

2020
def time_apply_render(self, cols, rows):

doc/make.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ def latex(self, force=False):
260260
for i in range(3):
261261
self._run_os("pdflatex", "-interaction=nonstopmode", "pandas.tex")
262262
raise SystemExit(
263-
"You should check the file "
264-
'"build/latex/pandas.pdf" for problems.'
263+
'You should check the file "build/latex/pandas.pdf" for problems.'
265264
)
266265
self._run_os("make")
267266
return ret_code
@@ -343,8 +342,7 @@ def main():
343342
dest="verbosity",
344343
default=0,
345344
help=(
346-
"increase verbosity (can be repeated), "
347-
"passed to the sphinx build command"
345+
"increase verbosity (can be repeated), passed to the sphinx build command"
348346
),
349347
)
350348
argparser.add_argument(

doc/source/user_guide/style.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@
12881288
"outputs": [],
12891289
"source": [
12901290
"df2.loc[:4].style.highlight_max(\n",
1291-
" axis=1, props=(\"color:white; \" \"font-weight:bold; \" \"background-color:darkblue;\")\n",
1291+
" axis=1, props=(\"color:white; font-weight:bold; background-color:darkblue;\")\n",
12921292
")"
12931293
]
12941294
},

pandas/core/apply.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,8 +1645,7 @@ def reconstruct_func(
16451645
# GH 28426 will raise error if duplicated function names are used and
16461646
# there is no reassigned name
16471647
raise SpecificationError(
1648-
"Function names must be unique if there is no new column names "
1649-
"assigned"
1648+
"Function names must be unique if there is no new column names assigned"
16501649
)
16511650
if func is None:
16521651
# nicer error message

pandas/core/arrays/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,9 +1791,11 @@ def take(self, indices, allow_fill=False, fill_value=None):
17911791
# type for the array, to the physical storage type for
17921792
# the data, before passing to take.
17931793
1794-
result = take(data, indices, fill_value=fill_value, allow_fill=allow_fill)
1794+
result = take(
1795+
data, indices, fill_value=fill_value, allow_fill=allow_fill
1796+
)
17951797
return self._from_sequence(result, dtype=self.dtype)
1796-
""" # noqa: E501
1798+
"""
17971799
# Implementer note: The `fill_value` parameter should be a user-facing
17981800
# value, an instance of self.dtype.type. When passed `fill_value=None`,
17991801
# the default of `self.dtype.na_value` should be used.

pandas/core/arrays/datetimes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2707,8 +2707,7 @@ def _maybe_infer_tz(tz: tzinfo | None, inferred_tz: tzinfo | None) -> tzinfo | N
27072707
pass
27082708
elif not timezones.tz_compare(tz, inferred_tz):
27092709
raise TypeError(
2710-
f"data is already tz-aware {inferred_tz}, unable to "
2711-
f"set specified tz: {tz}"
2710+
f"data is already tz-aware {inferred_tz}, unable to set specified tz: {tz}"
27122711
)
27132712
return tz
27142713

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/core/computation/expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ def visit_Call(self, node, side=None, **kwargs):
698698
if not isinstance(key, ast.keyword):
699699
# error: "expr" has no attribute "id"
700700
raise ValueError(
701-
"keyword error in function call " f"'{node.func.id}'" # type: ignore[attr-defined]
701+
f"keyword error in function call '{node.func.id}'" # type: ignore[attr-defined]
702702
)
703703

704704
if key.arg:

pandas/core/computation/ops.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,7 @@ def __init__(self, op: Literal["+", "-", "~", "not"], operand) -> None:
512512
self.func = _unary_ops_dict[op]
513513
except KeyError as err:
514514
raise ValueError(
515-
f"Invalid unary operator {op!r}, "
516-
f"valid operators are {UNARY_OPS_SYMS}"
515+
f"Invalid unary operator {op!r}, valid operators are {UNARY_OPS_SYMS}"
517516
) from err
518517

519518
def __call__(self, env) -> MathCall:

0 commit comments

Comments
 (0)