Skip to content

Commit 1f7305f

Browse files
committed
REF: inline _object_ops
1 parent ce11d42 commit 1f7305f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pandas/core/arrays/datetimes.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ def _scalar_type(self) -> type[Timestamp]:
236236
"is_year_end",
237237
"is_leap_year",
238238
]
239-
_object_ops: list[str] = ["freq", "tz"]
240239
_field_ops: list[str] = [
241240
"year",
242241
"month",
@@ -257,7 +256,7 @@ def _scalar_type(self) -> type[Timestamp]:
257256
]
258257
_other_ops: list[str] = ["date", "time", "timetz"]
259258
_datetimelike_ops: list[str] = (
260-
_field_ops + _object_ops + _bool_ops + _other_ops + ["unit"]
259+
_field_ops + _bool_ops + _other_ops + ["unit", "freq", "tz"]
261260
)
262261
_datetimelike_methods: list[str] = [
263262
"to_period",

pandas/core/arrays/timedeltas.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,8 @@ def _scalar_type(self) -> type[Timedelta]:
152152
# define my properties & methods for delegation
153153
_other_ops: list[str] = []
154154
_bool_ops: list[str] = []
155-
_object_ops: list[str] = ["freq"]
156155
_field_ops: list[str] = ["days", "seconds", "microseconds", "nanoseconds"]
157-
_datetimelike_ops: list[str] = _field_ops + _object_ops + _bool_ops + ["unit"]
156+
_datetimelike_ops: list[str] = _field_ops + _bool_ops + ["unit", "freq"]
158157
_datetimelike_methods: list[str] = [
159158
"to_pytimedelta",
160159
"total_seconds",

0 commit comments

Comments
 (0)