Skip to content

Commit 3d6525a

Browse files
dkirov-ddclaude
andcommitted
fix(downloader): rename --index to --v2
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent e3d659e commit 3d6525a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • datadog_checks_downloader/datadog_checks/downloader

datadog_checks_downloader/datadog_checks/downloader/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ def run_downloader(tuf_downloader, standard_distribution_name, version, ignore_p
149149
def download():
150150
# Peek at --index before delegating so that v1 call-sites are unaffected.
151151
parser = argparse.ArgumentParser(add_help=False)
152-
parser.add_argument('--index', action='store_true', default=False)
152+
parser.add_argument('--v2', action='store_true', default=False)
153153
partial_args, _ = parser.parse_known_args()
154154

155-
if partial_args.index:
155+
if partial_args.v2:
156156
_download_v2()
157157
else:
158158
tuf_downloader, standard_distribution_name, version, ignore_python_version = instantiate_downloader()
@@ -176,7 +176,7 @@ def _download_v2():
176176
help='Disable TUF verification and wheel digest checks.',
177177
)
178178
parser.add_argument('-v', '--verbose', action='count', default=0)
179-
parser.add_argument('--index', action='store_true', default=True) # consumed upstream; kept for completeness
179+
parser.add_argument('--v2', action='store_true', default=True) # consumed upstream; kept for completeness
180180

181181
# v1 flags that are not applicable in v2: accept and warn so that callers
182182
# upgrading from v1 get a clear message instead of an argument error.
@@ -196,10 +196,10 @@ def _download_v2():
196196
raise NonCanonicalVersion(args.version)
197197

198198
if args._type_ignored is not None:
199-
sys.stderr.write('WARNING: --type is not applicable with --index and will be ignored.\n')
199+
sys.stderr.write('WARNING: --type is not applicable with --v2 and will be ignored.\n')
200200
if args._ignore_python_version:
201201
sys.stderr.write(
202-
'NOTE: --ignore-python-version is not applicable with --index '
202+
'NOTE: --ignore-python-version is not applicable with --v2 '
203203
'(wheel selection happens at publish time).\n'
204204
)
205205

0 commit comments

Comments
 (0)