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

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

Merged
merged 3 commits into from Jan 24, 2023

Conversation

echoix
Copy link
Contributor

@echoix echoix commented Jan 22, 2023

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
Copy link
Contributor Author

echoix commented Jan 22, 2023

@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
Copy link
Contributor Author

echoix commented Jan 22, 2023

My CHANGES.md message would be:

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

@JelleZijlstra
Copy link
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
Copy link

github-actions bot commented Jan 22, 2023

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


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

@echoix
Copy link
Contributor Author

echoix commented Jan 24, 2023

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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reproducible black --help output for --python-cell-magics option
2 participants