ibis
ibis copied to clipboard
docs: include return type in Interval.years, .months, etc
Fixes https://github.com/ibis-project/ibis/issues/8165
@NickCrews Thanks for the PR. Is there any chance that instead of this approach we can add these methods and properties individually to _quarto.yml (likely requiring dynamic: true for each of them)?
Per this thread, if I try
@public
class IntervalValue(Value):
quarters: ir.IntegerValue
"""The number of quarters"""
@property
def quarters(self) -> ir.IntegerValue:
return self.to_unit("Q")
it generates (note no docstring)
| Name | Description |
| --- | --- |
| [quarters](#ibis.expr.types.temporal.IntervalValue.quarters) | |
Probably this is something to do with the metapgrogramming of Value using the class type annotations? So seems like this workaround won't work for us at all.
From reading that thread, I think I have come to the conclusion that my current implementation is the only way to do this currently.
I think this is still a gradual improvement, even if it isn't ideal. I think it shouldn't be bad to reverse or improve this later if this functionality changes. At the least, it adds __add__ documentation, which was missing.