We have instances of @options() (from src/sage/misc/decorators.py)
applied to functions in the library, e.g.
https://github.com/sagemath/sage/blob/41031292ff1ae518cd5b5a29ce277aa1ff8ced9e/src/sage/plot/contour_plot.py#L1394
where an argument name of the form foo=bar in @options
matches an argument name foo of the function, e.g.
@options(plot_points=100, incol='blue', outcol=None, bordercol=None,
borderstyle=None, borderwidth=None, frame=False, axes=True,
legend_label=None, aspect_ratio=1, alpha=1)
def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol,
borderstyle, borderwidth, alpha, **options):
Sphinx 7.1 (or newer) does not like these, it complains about duplicate names.
Isn't it true that the above may be simplified, removing foo=bar from
@options() and putting this in the function definition, i.e.
@options(frame=False, axes=True,
legend_label=None, aspect_ratio=1, alpha=1)
def region_plot(f, xrange, yrange, plot_points=100, incol='blue',
outcol=None, bordercol=None,
borderstyle=None, borderwidth=None, alpha=1, **options):
would result in the same functionality of region_plot() ?
(Asssuming in the function body no need to have
options['plot_points'], etc. arises?)
Dima