Skip to content

Commit 51c6e79

Browse files
⬆️ UPGRADE: Autoupdate pre-commit config (#54043)
* ⬆️ UPGRADE: Autoupdate pre-commit config * add codespell, ignore RUF012 * noqa RUF011, ignore another ruff code * Rename --------- Co-authored-by: MarcoGorelli <[email protected]>
1 parent 76854ce commit 51c6e79

Some content is hidden

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

52 files changed

+202
-173
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
hooks:
2222
- id: black
2323
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: v0.0.270
24+
rev: v0.0.275
2525
hooks:
2626
- id: ruff
2727
args: [--exit-non-zero-on-fix]
@@ -33,7 +33,7 @@ repos:
3333
pass_filenames: true
3434
require_serial: false
3535
- repo: https://github.com/codespell-project/codespell
36-
rev: v2.2.4
36+
rev: v2.2.5
3737
hooks:
3838
- id: codespell
3939
types_or: [python, rst, markdown, cython, c]
@@ -91,7 +91,7 @@ repos:
9191
hooks:
9292
- id: isort
9393
- repo: https://github.com/asottile/pyupgrade
94-
rev: v3.4.0
94+
rev: v3.7.0
9595
hooks:
9696
- id: pyupgrade
9797
args: [--py39-plus]

pandas/_libs/algos.pyi

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ import numpy as np
55
from pandas._typing import npt
66

77
class Infinity:
8-
"""
9-
Provide a positive Infinity comparison method for ranking.
10-
"""
11-
128
def __eq__(self, other) -> bool: ...
139
def __ne__(self, other) -> bool: ...
1410
def __lt__(self, other) -> bool: ...
@@ -17,10 +13,6 @@ class Infinity:
1713
def __ge__(self, other) -> bool: ...
1814

1915
class NegInfinity:
20-
"""
21-
Provide a negative Infinity comparison method for ranking.
22-
"""
23-
2416
def __eq__(self, other) -> bool: ...
2517
def __ne__(self, other) -> bool: ...
2618
def __lt__(self, other) -> bool: ...

pandas/core/algorithms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ def searchsorted(
13221322
arr: ArrayLike,
13231323
value: NumpyValueArrayLike | ExtensionArray,
13241324
side: Literal["left", "right"] = "left",
1325-
sorter: NumpySorter = None,
1325+
sorter: NumpySorter | None = None,
13261326
) -> npt.NDArray[np.intp] | np.intp:
13271327
"""
13281328
Find indices where elements should be inserted to maintain order.

pandas/core/arrays/_mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def searchsorted(
233233
self,
234234
value: NumpyValueArrayLike | ExtensionArray,
235235
side: Literal["left", "right"] = "left",
236-
sorter: NumpySorter = None,
236+
sorter: NumpySorter | None = None,
237237
) -> npt.NDArray[np.intp] | np.intp:
238238
npvalue = self._validate_setitem_value(value)
239239
return self._ndarray.searchsorted(npvalue, side=side, sorter=sorter)

pandas/core/arrays/arrow/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ def searchsorted(
10561056
self,
10571057
value: NumpyValueArrayLike | ExtensionArray,
10581058
side: Literal["left", "right"] = "left",
1059-
sorter: NumpySorter = None,
1059+
sorter: NumpySorter | None = None,
10601060
) -> npt.NDArray[np.intp] | np.intp:
10611061
if self._hasna:
10621062
raise ValueError(

pandas/core/arrays/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ def searchsorted(
926926
self,
927927
value: NumpyValueArrayLike | ExtensionArray,
928928
side: Literal["left", "right"] = "left",
929-
sorter: NumpySorter = None,
929+
sorter: NumpySorter | None = None,
930930
) -> npt.NDArray[np.intp] | np.intp:
931931
"""
932932
Find indices where elements should be inserted to maintain order.

pandas/core/arrays/masked.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ def searchsorted(
922922
self,
923923
value: NumpyValueArrayLike | ExtensionArray,
924924
side: Literal["left", "right"] = "left",
925-
sorter: NumpySorter = None,
925+
sorter: NumpySorter | None = None,
926926
) -> npt.NDArray[np.intp] | np.intp:
927927
if self._hasna:
928928
raise ValueError(

pandas/core/arrays/period.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ def searchsorted(
781781
self,
782782
value: NumpyValueArrayLike | ExtensionArray,
783783
side: Literal["left", "right"] = "left",
784-
sorter: NumpySorter = None,
784+
sorter: NumpySorter | None = None,
785785
) -> npt.NDArray[np.intp] | np.intp:
786786
npvalue = self._validate_setitem_value(value).view("M8[ns]")
787787

pandas/core/arrays/sparse/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ def searchsorted(
11341134
self,
11351135
v: ArrayLike | object,
11361136
side: Literal["left", "right"] = "left",
1137-
sorter: NumpySorter = None,
1137+
sorter: NumpySorter | None = None,
11381138
) -> npt.NDArray[np.intp] | np.intp:
11391139
msg = "searchsorted requires high memory usage."
11401140
warnings.warn(msg, PerformanceWarning, stacklevel=find_stack_level())

pandas/core/arrays/string_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ def searchsorted(
513513
self,
514514
value: NumpyValueArrayLike | ExtensionArray,
515515
side: Literal["left", "right"] = "left",
516-
sorter: NumpySorter = None,
516+
sorter: NumpySorter | None = None,
517517
) -> npt.NDArray[np.intp] | np.intp:
518518
if self._hasna:
519519
raise ValueError(

0 commit comments

Comments
 (0)