-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[MLGO] Refactored verbosity flag in mlgo-utils to common location #128541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
651fbfe
cd67627
7d6eea7
a6979af
d6b095c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| # See https://llvm.org/LICENSE.txt for license information. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| """Library functions for setting up common parser arguments""" | ||
|
|
||
| from argparse import ArgumentParser | ||
|
|
||
| def add_verbosity_arguments(parser: ArgumentParser) -> None: | ||
| """Adds the arguments for verbosity to the ArgumentParser | ||
|
|
||
| Arguments: | ||
| parser -- the argument parser being modified with verbosity arguments | ||
| """ | ||
| parser.add_argument( | ||
| "--verbosity", | ||
| type=str, | ||
| help="The verbosity level to use for logging", | ||
| default="INFO", | ||
| nargs="?", | ||
| choices=["DEBUG", "INFO", "WARNING", "ERROR"], | ||
| ) | ||
|
||
Uh oh!
There was an error while loading. Please reload this page.