Skip to content

Documentation shows incorrect default values for keyword-only arguments #39627

Open
@DaveWitteMorris

Description

@DaveWitteMorris

Steps To Reproduce

The signature of the method sage.categories.enumerated_sets.EnumeratedSets.ParentMethods.map is map(self, f, name=None, *, is_injective=True), but the documentation shows map(f, name, is_injective=None). (See this doc page.)

Expected Behavior

The documentation should show the correct signature of the method.

Actual Behavior

There are two problems with the signature that is presented in the documentation:

  1. The default value for the name argument is erroneously given to is_injective instead.
  2. There is no indication that is_injective is a keyword-only argument.

Additional Information

The problems are not unique to this method -- they also show up in the documentation of other methods that have a keyword-only argument, such as sage.combinat.designs.bibd.BalancedIncompleteBlockDesign.arc. It appears to me that sphinx/autodoc is shifting the default values one step to the right.

Environment

  • OS: any(?)
  • Sage Version: 10.5 (but probably not important)

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions