We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1d57e3 commit c3c1121Copy full SHA for c3c1121
src/pydiverse/transform/_internal/ops/ops/datetime.py
@@ -6,16 +6,17 @@
6
7
8
class DatetimeExtract(Operator):
9
- def __init__(self, name: str):
10
- super().__init__(name, Signature(Datetime(), return_type=Int()))
+ def __init__(self, name: str, doc: str = ""):
+ super().__init__(name, Signature(Datetime(), return_type=Int()), doc=doc)
11
12
13
class DateExtract(Operator):
14
15
super().__init__(
16
name,
17
Signature(Date(), return_type=Int()),
18
Signature(Datetime(), return_type=Int()),
19
+ doc=doc,
20
)
21
22
@@ -41,8 +42,8 @@ def __init__(self, name: str):
41
42
43
44
class DurationToUnit(Operator):
45
- super().__init__(name, Signature(Duration(), return_type=Int()))
46
+ super().__init__(name, Signature(Duration(), return_type=Int()), doc=doc)
47
48
49
dur_days = DurationToUnit("dur.days")
src/pydiverse/transform/_internal/ops/ops/horizontal.py
@@ -6,9 +6,13 @@
class Horizontal(Operator):
- def __init__(self, name: str, *signatures: Signature):
+ def __init__(self, name: str, *signatures: Signature, doc: str = ""):
- name, *signatures, param_names=["arg", "args"], generate_expr_method=False
+ name,
+ *signatures,
+ param_names=["arg", "args"],
+ generate_expr_method=False,
src/pydiverse/transform/_internal/ops/ops/markers.py
@@ -6,8 +6,8 @@
class Marker(Operator):
- super().__init__(name, Signature(D, return_type=D))
+ super().__init__(name, Signature(D, return_type=D), doc=doc)
nulls_first = Marker("nulls_first")
src/pydiverse/transform/_internal/ops/ops/string.py
class StrUnary(Operator):
- super().__init__(name, Signature(String(), return_type=String()))
+ super().__init__(name, Signature(String(), return_type=String()), doc=doc)
str_strip = StrUnary("str.strip")
src/pydiverse/transform/_internal/ops/ops/window.py
@@ -15,6 +15,7 @@ def __init__(
param_names: list[str] | None = None,
default_values: list[Any] | None = None,
generate_expr_method=False,
+ doc: str = "",
):
@@ -24,6 +25,7 @@ def __init__(
24
25
param_names=param_names,
26
default_values=default_values,
27
generate_expr_method=generate_expr_method,
28
29
30
31
0 commit comments