Skip to content

DOC: Fix stretch parameter typo in docstrings - #19871

Merged
pllim merged 4 commits into
astropy:mainfrom
arsenelupin14:fix-simple-norm-docs-19868
Jun 9, 2026
Merged

DOC: Fix stretch parameter typo in docstrings#19871
pllim merged 4 commits into
astropy:mainfrom
arsenelupin14:fix-simple-norm-docs-19868

Conversation

@arsenelupin14

@arsenelupin14 arsenelupin14 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Fixes a typo in the stretch parameter description in mpl_normalize.py and fits2bitmap.py where log' was written instead of 'log'. This unmatched quote confused the Sphinx parser, causing it to auto-link 'power' to the power unit.

Prompted by #19868

An unmatched single quote in `log'` caused docstring parser to
fall back and auto-link `'power'` to the global `power` unit.

Closes astropy#19868
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

Comment thread docs/changes/visualization/19871.bugfix.rst Outdated
@pllim

pllim commented Jun 8, 2026

Copy link
Copy Markdown
Member

While you did catch a missing quote, alas your patch does not fix the original reported problem. Please see the rendered doc from your PR: https://astropy--19871.org.readthedocs.build/en/19871/api/astropy.visualization.mpl_normalize.simple_norm.html#astropy.visualization.mpl_normalize.simple_norm

Comment thread docs/conf.py Outdated
# TODO! not need to ignore.
"flag",
"bits",
"power",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm alas, my hunch was wrong. Your PR doc preview shows that this does not fix the ref. :(

You might have to look at https://github.com/astropy/sphinx-astropy/blob/66e6ba9b13c0869b2259a0726eaedf264def3553/sphinx_astropy/conf/v2.py#L135 or something over there...

@astrofrog

Copy link
Copy Markdown
Member

@arsenelupin14 @pllim - I think astropy/sphinx-astropy#103 might be the proper fix for this (though we should still also do 980ea73 independently of this).

[ci skip]

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's just get the missing quotes in for now. Thanks!

@pllim pllim added backport-v7.2.x on-merge: backport to v7.2.x backport-v8.0.x on-merge: backport to v8.0.x labels Jun 9, 2026
@pllim

pllim commented Jun 9, 2026

Copy link
Copy Markdown
Member

I'll squash merge when I see RTD green.

@pllim
pllim merged commit cfc126a into astropy:main Jun 9, 2026
2 checks passed
pllim added a commit that referenced this pull request Jun 9, 2026
…9887)

Co-authored-by: Ikbar Faiz <ikbarfaiz8@gmail.com>

[ci skip]
pllim added a commit that referenced this pull request Jun 9, 2026
…871-on-v8.0.x

Backport PR #19871 on branch v8.0.x (DOC: Fix stretch parameter typo in docstrings)

[ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants