Skip to content

fix @options() in contour_lot to allow Sphinx 7.2.6 #36295

@dimpase

Description

@dimpase

here is the patch which allows Sphinx 7.2.6 and produces no doctest errors
The problem is that Sphinx 7.1+ complains about duplicate names there, see
sage-devel

--- a/src/sage/plot/contour_plot.py
+++ b/src/sage/plot/contour_plot.py
@@ -1391,11 +1391,9 @@ def implicit_plot(f, xrange, yrange, **options):
         raise ValueError("fill=%s is not supported" % options['fill'])
 
 
-@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):
+@options(frame=False, axes=True, legend_label=None, aspect_ratio=1)
+def region_plot(f, xrange, yrange, plot_points=100, incol='blue', outcol=None, bordercol=None,
+                borderstyle=None, borderwidth=None, alpha=1, **options):
     r"""
     ``region_plot`` takes a boolean function of two variables, `f(x, y)`
     and plots the region where f is True over the specified

Originally posted by @dimpase in #36276 (comment)

Apparently this is the only place in Sage where @options() is used to assign values to positional args of a function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions