From b8f80ece8a4548feb2c8f4e29113e58044e2b8a3 Mon Sep 17 00:00:00 2001 From: Timothy Crosley Date: Sun, 5 Jan 2020 14:05:09 -0800 Subject: Update version shorthand flags --- CHANGELOG.md | 1 + isort/main.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dffc2678..3b78e165 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Changelog - Config files are no longer composed on-top of each-other. Instead the first config file found is used. - Since there is no longer composition negative form settings (such as --dont-skip) are no longer required and have been removed. - Two-letter shortened setting names (like `ac` for `atomic`) now require two dashes to avoid ambiguity: `--ac`. + - For consistency with other tools `-v` now is shorthand for verbose and `-V` is shorthand for version. See Issue: #1067. - `length_sort_{section_name}` config usage has been deprecated. Instead `length_sort_sections` list can be used to specify a list of sections that need to be length sorted. - `safety_excludes` and `unsafe` have been deprecated - Config now includes as default full set of safety directories defined by safety excludes. diff --git a/isort/main.py b/isort/main.py index 2c30cfa0..2dab21ae 100644 --- a/isort/main.py +++ b/isort/main.py @@ -449,9 +449,10 @@ def parse_args(argv: Optional[Sequence[str]] = None) -> Dict[str, Any]: action="store_true", help="Use parenthesis for line continuation on length limit instead of slashes.", ) - parser.add_argument("-v", "--version", action="store_true", dest="show_version") + parser.add_argument("-V", "--version", action="store_true", dest="show_version", + help="Displays the currently installed version of isort.") parser.add_argument( - "--vb", + "-v", "--verbose", action="store_true", dest="verbose", -- cgit v1.2.1