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

Don't use a dash if there's no description to introduce #12035

Merged
merged 3 commits into from
Mar 3, 2024

Conversation

nedbat
Copy link
Contributor

@nedbat nedbat commented Mar 2, 2024

Subject: In parameter lists, an en-dash is added even if there's no description following it.

Feature or Bugfix

  • Bugfix

Purpose

The coverage.py docs currently have this:
image

My docstrings aren't structured in a way to extract parameters, so there are no descriptions for them. But there's a dash leading to nothing.

With this fix, the same parameter list looks like this, which makes more sense:
image

@jayaddison jayaddison added easy issue that can be solved by beginners type:bug and removed easy issue that can be solved by beginners labels Mar 2, 2024
sphinx/util/docfields.py Show resolved Hide resolved
sphinx/util/docfields.py Outdated Show resolved Hide resolved
Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I'll do a little check tomorrow so I'll only merge it after that but consider your PR approved.

@picnixz
Copy link
Member

picnixz commented Mar 3, 2024

Thank you! I don't think a changelog entry is needed, but feel free to create one in a separate PR if you want!

@picnixz picnixz merged commit a7df31c into sphinx-doc:master Mar 3, 2024
22 checks passed
@nedbat nedbat deleted the nedbat/no-dash-for-empty branch March 4, 2024 12:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2024
@AA-Turner AA-Turner added this to the 7.3.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants