amol- commented on a change in pull request #12076:
URL: https://github.com/apache/arrow/pull/12076#discussion_r783796105
##########
File path: python/pyarrow/_compute.pyx
##########
@@ -1027,6 +1266,15 @@ cdef class _ScalarAggregateOptions(FunctionOptions):
class ScalarAggregateOptions(_ScalarAggregateOptions):
+ __doc__ = f"""
+ Options for scalar aggregations.
+
+ Parameters
+ ----------
+ {_skip_nulls_doc()}
Review comment:
Yes, I mean that there might be a point where the various places where
they are used are not aligned anymore.
I'm not concerned about the current state of things, the functions report
the docstrings of individual options etc, I'm mostly concerned that in 1 year
from now we will forget how we designed that to be and someone might think that
it's reasonable for example to add one more option in `_skip_nulls_doc()`
causing a wrong option to be added to one of the Option classes using that
function.
I guess one possible solution would be to have something inspecting the
class and confirming the arguments in `__init__` match with those documented.
And throwing an error when they don't. At least developers would be informed
when they break something.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]