Skip to content

Commit 196b1f3

Browse files
authored
Fix black --help output for --python-cell-magics option to be reproducible (#3516)
1 parent d950f15 commit 196b1f3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969

7070
<!-- Changes to Black's terminal output and error messages -->
7171

72+
- Calling `black --help` multiple times will return the same help contents each time
73+
(#3516)
7274
- Verbose logging now shows the values of `pyproject.toml` configuration variables
7375
(#3392)
7476
- Fix false symlink detection messages in verbose output due to using an incorrect

src/black/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def validate_regex(
244244
multiple=True,
245245
help=(
246246
"When processing Jupyter Notebooks, add the given magic to the list"
247-
f" of known python-magics ({', '.join(PYTHON_CELL_MAGICS)})."
247+
f" of known python-magics ({', '.join(sorted(PYTHON_CELL_MAGICS))})."
248248
" Useful for formatting cells with custom python magics."
249249
),
250250
default=[],

0 commit comments

Comments
 (0)