Repository navigation
Make the documented -v example match what black actually prints - #5560
Merged
Merged
Conversation
The auto-discovered config message is 'Using configuration from project root.' (src/black/__init__.py prints it when the config parameter comes from the default source), not 'Using configuration from /tmp/pyproject.toml.'. And the summary line always ends with a period (report.py joins with '.'), as the other examples in the file already show.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
-v/--verboseexample indocs/usage_and_configuration/the_basics.mdshows two lines that don't match what the CLI actually prints:Using configuration from /tmp/pyproject.toml.— when the config file is auto-discovered (no--configpassed, which is the case in the shown commandblack src/ -v),mainprintsUsing configuration from project root.(src/black/__init__.py:660-664, theParameterSource.DEFAULTbranch). The message that names the file is spelledUsing configuration in '<path>'.and only appears when--configis passed explicitly. So the shown line can never be printed by the shown command.get_summary_messagealways appends a final"."(src/black/report.py:122), and the other summary examples in the same file already end with a period (e.g. line 472).Two one-token fixes inside the existing fenced block; no prose changes.
Checklist - did you ...
--previewstyle, following the stability policy? — not applicable (docs only, ticked to show the checklist was read)CHANGES.mdif necessary? — not necessary (docs-only; happy to have theskip-changeloglabel applied)Verification: docs-only; each claim checked against
src/black/__init__.pyandsrc/black/report.pyat base commit11cff13. My open PRs #5555 and #5556 edit other line ranges of this same file (quickstart--versionexample and theINTERNAL ERRORexample); the hunks here are disjoint from both.