From 196b1f349eb2baa9bbbc483226874cc01fb7567d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Tue, 24 Jan 2023 08:43:24 -0500 Subject: [PATCH] Fix `black --help` output for `--python-cell-magics` option to be reproducible (#3516) --- CHANGES.md | 2 ++ src/black/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index e311c49..2acb31d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -69,6 +69,8 @@ +- Calling `black --help` multiple times will return the same help contents each time + (#3516) - Verbose logging now shows the values of `pyproject.toml` configuration variables (#3392) - Fix false symlink detection messages in verbose output due to using an incorrect diff --git a/src/black/__init__.py b/src/black/__init__.py index daf6f88..f24487f 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -244,7 +244,7 @@ def validate_regex( multiple=True, help=( "When processing Jupyter Notebooks, add the given magic to the list" - f" of known python-magics ({', '.join(PYTHON_CELL_MAGICS)})." + f" of known python-magics ({', '.join(sorted(PYTHON_CELL_MAGICS))})." " Useful for formatting cells with custom python magics." ), default=[], -- 2.39.5