Skip to content

Commit a072c6b

Browse files
committed
rewrite functools, adjust unit tests
1 parent bd4025a commit a072c6b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pandas/core/accessor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ def _setter(self, new_values):
116116
doc=getattr(delegate, accessor_mapping(name)).__doc__,
117117
)
118118

119-
from functools import wraps
119+
import functools as ft
120120

121121
def _create_delegator_method(name: str):
122-
original_method = getattr(delegate, accessor_mapping(name))
122+
method = getattr(delegate, accessor_mapping(name))
123123

124-
@wraps(original_method)
124+
@ft.wraps(method)
125125
def f(self, *args, **kwargs):
126126
return self._delegate_method(name, *args, **kwargs)
127127

pandas/tests/series/accessors/test_cat_accessor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def test_dt_accessor_api_for_categorical(self, idx):
177177

178178
_special_func_names = [f[0] for f in special_func_defs]
179179

180-
_ignore_names = ["components", "tz_localize", "tz_convert"]
180+
_ignore_names = ["components", "to_timestamp", "tz_localize", "tz_convert"]
181181

182182
func_names = [
183183
fname

pandas/tests/series/accessors/test_dt_accessor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
ok_for_dt = DatetimeArray._datetimelike_ops
4646
ok_for_dt_methods = [
4747
"to_period",
48+
"to_timestamp",
4849
"to_pydatetime",
4950
"tz_localize",
5051
"tz_convert",

0 commit comments

Comments
 (0)