Skip to content

Commit

Permalink
Merge pull request #1590 from akihironitta/issue/1579
Browse files Browse the repository at this point in the history
Add description of `--check` exit status to help message
  • Loading branch information
timothycrosley authored Nov 1, 2020
2 parents 22f4161 + 6282d29 commit 33683cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/configuration/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ Combines all the bare straight imports of the same section in a single line. Won

## Check

Checks the file for unsorted / unformatted imports and prints them to the command line without modifying the file.
Checks the file for unsorted / unformatted imports and prints them to the command line without modifying the file. Returns 0 when nothing would change and returns 1 when the file would be reformatted.

**Type:** Bool
**Default:** `False`
Expand Down
3 changes: 2 additions & 1 deletion isort/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ def _build_arg_parser() -> argparse.ArgumentParser:
action="store_true",
dest="check",
help="Checks the file for unsorted / unformatted imports and prints them to the "
"command line without modifying the file.",
"command line without modifying the file. Returns 0 when nothing would change and "
"returns 1 when the file would be reformatted.",
)
general_group.add_argument(
"--ws",
Expand Down

0 comments on commit 33683cd

Please sign in to comment.