Add support for inference of method arguments
Compare changes
Maintenance will be performed on git.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 22 April 2025 starting at approximately 9am PDT. It is expected to take around 30 minutes and there will be several periods of downtime throughout the maintenance. Please address any comments, concerns, or questions to the helpdesk. This maintenance will be upgrading the GitLab database in order to be ready for the migration.
This MR closes #409 (closed).
utils._infer_args_from_function_except_n_args
to allow an arbitrary number of arguments to be ignored.utils.infer_parameters_from_function
has been updated to infer if a passed argument is a function or a method (or will raise a ValueError
if it is neither.The behaviour of utils.infer_parameters_from_function
may not be considered optimal, as it will fail in the case that an object with a __call__()
method is passed as an argument. If you're keen for this form to be supported I can add an additional case for it.