From 0bace7fe4448dc99e951fc302a7801be05623982 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Sat, 15 Aug 2020 08:53:05 -0700 Subject: [PATCH] Deprecate, don't remove This makes it ever so slightly easier for users upgrading to 2.0. We still remove all functionality from the flag - it now no-ops. --- src/python/pants/option/global_options.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/python/pants/option/global_options.py b/src/python/pants/option/global_options.py index d2179012e23..2e6c1d55d88 100644 --- a/src/python/pants/option/global_options.py +++ b/src/python/pants/option/global_options.py @@ -218,6 +218,21 @@ def register_bootstrap_options(cls, register): "from the start of the warning string, and will always be case-insensitive. " "See the `warnings` module documentation for more background on these are used.", ) + register( + "--option-name-check-distance", + advanced=True, + type=int, + default=2, + help=( + "The maximum Levenshtein distance to use when offering suggestions for invalid " + "option names." + ), + removal_version="2.1.0.dev0", + removal_hint=( + "The option `--option-name-check-distance` no longer does anything, as Pants now " + "always uses the default of 2." + ), + ) register( "--pants-version",