Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the displayed signature for abstract methods #13271

Merged
merged 6 commits into from
Jan 29, 2025

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Jan 26, 2025

Purpose

Render abstract methods with the abstractmethod prefix instead of abstract.

The three options we have are:

  1. keeping abstract,
  2. using abstractmethod, or
  3. using abstract method.

The second has symmetry with the decorator (abc.abstractmethod), though of course a method can be abstract just by raising NotImplementedError or documented as abstract for other reasons.

The third has some symmetry with abstract properties, which are currently documented as abstract property.

References

A

@AA-Turner AA-Turner added this to the 8.2.0 milestone Jan 26, 2025
@AA-Turner AA-Turner merged commit 5667050 into sphinx-doc:master Jan 29, 2025
22 checks passed
@AA-Turner AA-Turner deleted the abstractmethod branch January 29, 2025 02:34
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant