Skip to content

Fix black --help output for --python-cell-magics option to be reproducible#3516

Merged
JelleZijlstra merged 3 commits into
psf:mainfrom
echoix:fix/stable-help-output
Jan 24, 2023
Merged

Fix black --help output for --python-cell-magics option to be reproducible#3516
JelleZijlstra merged 3 commits into
psf:mainfrom
echoix:fix/stable-help-output

Conversation

@echoix

@echoix echoix commented Jan 22, 2023

Copy link
Copy Markdown
Contributor

Description

Fixes #3515

This small change is to fix the issue #3515. It adds a sorted(...) to the PYTHON_CELL_MAGICS set wrapped inside a string.join() in order to have a stable output in the black --help command. No other changes are required.

Checklist - did you ...

  • Add an entry in CHANGES.md if necessary? See comment below.
  • Add / update tests if necessary? : Did not find something that checks the existing output
  • Add new / update outdated documentation? : I don't think it is related
@echoix

echoix commented Jan 22, 2023

Copy link
Copy Markdown
Contributor Author

@ichard26 For the changelog, is there an order in which to add the changes? (For example, newest at top per category?) I didn't find a pattern in the unreleased sections: the "Preview style" section seemed to be newest-first, but the "Output" section (the one I think this is concerned), was oldest-first.

@echoix

echoix commented Jan 22, 2023

Copy link
Copy Markdown
Contributor Author

My CHANGES.md message would be:

- Calling `black --help` multiple times will return the same help contents each
  time (#3516)
@JelleZijlstra

Copy link
Copy Markdown
Collaborator

You can put it anywhere in the list, we don't really have a standard. The way we handle merges on this file tends to result in the entries going in somewhat random orders. I might rearrange them on release to put the most significant changes first.

@github-actions

github-actions Bot commented Jan 22, 2023

Copy link
Copy Markdown
Contributor

diff-shades reports zero changes comparing this PR (39f39be) to main (a36878e).


What is this? | Workflow run | diff-shades documentation

@echoix

echoix commented Jan 24, 2023

Copy link
Copy Markdown
Contributor Author

Since I fixed the CI failure for the markdown linting in the CHANGES.md, is everything ready to go now? Am I still missing something?

@JelleZijlstra JelleZijlstra merged commit 196b1f3 into psf:main Jan 24, 2023
@JelleZijlstra

Copy link
Copy Markdown
Collaborator

Thank you!

@echoix echoix deleted the fix/stable-help-output branch January 24, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants