Skip to content

Commit c166fe9

Browse files
authored
CLN/TST: parametrize (#44888)
1 parent ec85e03 commit c166fe9

File tree

26 files changed

+92
-90
lines changed

26 files changed

+92
-90
lines changed

asv_bench/benchmarks/arithmetic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def setup(self, op, shape):
144144
# should already be the case, but just to be sure
145145
df._consolidate_inplace()
146146

147-
# TODO: GH#33198 the setting here shoudlnt need two steps
147+
# TODO: GH#33198 the setting here shouldn't need two steps
148148
arr1 = np.random.randn(n_rows, max(n_cols // 4, 3)).astype("f8")
149149
arr2 = np.random.randn(n_rows, n_cols // 2).astype("i8")
150150
arr3 = np.random.randn(n_rows, n_cols // 4).astype("f8")

pandas/compat/pickle_compat.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ def load_reduce(self):
3535
args = stack.pop()
3636
func = stack[-1]
3737

38-
if len(args) and type(args[0]) is type:
39-
n = args[0].__name__ # noqa
40-
4138
try:
4239
stack[-1] = func(*args)
4340
return

pandas/core/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# flake8: noqa
1+
# flake8: noqa:F401
22

33
from pandas._libs import (
44
NaT,

pandas/core/arrays/datetimelike.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def asi8(self) -> npt.NDArray[np.int64]:
291291
# ----------------------------------------------------------------
292292
# Rendering Methods
293293

294-
def _format_native_types(self, na_rep="NaT", date_format=None):
294+
def _format_native_types(self, *, na_rep="NaT", date_format=None):
295295
"""
296296
Helper method for astype when converting to strings.
297297

pandas/core/arrays/datetimes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ def astype(self, dtype, copy: bool = True):
670670

671671
@dtl.ravel_compat
672672
def _format_native_types(
673-
self, na_rep="NaT", date_format=None, **kwargs
673+
self, *, na_rep="NaT", date_format=None, **kwargs
674674
) -> npt.NDArray[np.object_]:
675675
from pandas.io.formats.format import get_format_datetime64_from_values
676676

pandas/core/arrays/period.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ def _formatter(self, boxed: bool = False):
632632

633633
@dtl.ravel_compat
634634
def _format_native_types(
635-
self, na_rep="NaT", date_format=None, **kwargs
635+
self, *, na_rep="NaT", date_format=None, **kwargs
636636
) -> np.ndarray:
637637
"""
638638
actually format my specific types

pandas/core/arrays/timedeltas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def _formatter(self, boxed: bool = False):
426426

427427
@dtl.ravel_compat
428428
def _format_native_types(
429-
self, na_rep="NaT", date_format=None, **kwargs
429+
self, *, na_rep="NaT", date_format=None, **kwargs
430430
) -> np.ndarray:
431431
from pandas.io.formats.format import get_format_timedelta64
432432

pandas/core/computation/api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
# flake8: noqa
2-
1+
__all__ = ["eval"]
32
from pandas.core.computation.eval import eval

pandas/core/dtypes/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# flake8: noqa
1+
# flake8: noqa:F401
22

33
from pandas.core.dtypes.common import (
44
is_array_like,

pandas/core/dtypes/cast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def maybe_downcast_to_dtype(result: ArrayLike, dtype: str | np.dtype) -> ArrayLi
248248

249249
if isinstance(dtype, str):
250250
if dtype == "infer":
251-
inferred_type = lib.infer_dtype(ensure_object(result), skipna=False)
251+
inferred_type = lib.infer_dtype(result, skipna=False)
252252
if inferred_type == "boolean":
253253
dtype = "bool"
254254
elif inferred_type == "integer":

0 commit comments

Comments
 (0)