Skip to content

Commit e80d994

Browse files
committed
Shorten lines in get config
1 parent c3b9cbe commit e80d994

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

tools/get_config.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@
3434
if __name__ == '__main__':
3535
# Parse Options
3636
parser = get_default_options_parser(add_clean=False, add_options=False)
37-
parser.add_argument("--source", dest="source_dir", type=argparse_filestring_type, required=True,
38-
default=[], help="The source (input) directory", action="append")
39-
parser.add_argument("--prefix", dest="prefix", action="append",
40-
default=[], help="Restrict listing to parameters that have this prefix")
41-
parser.add_argument("-v", "--verbose", action="store_true", dest="verbose",
42-
default=False, help="Verbose diagnostic output")
37+
parser.add_argument(
38+
"--source", dest="source_dir", type=argparse_filestring_type,
39+
required=True, default=[], help="The source (input) directory",
40+
action="append")
41+
parser.add_argument(
42+
"--prefix", dest="prefix", action="append", default=[],
43+
help="Restrict listing to parameters that have this prefix")
44+
parser.add_argument(
45+
"-v", "--verbose", action="store_true", dest="verbose", default=False,
46+
help="Verbose diagnostic output")
4347

4448
options = parser.parse_args()
4549

@@ -56,7 +60,8 @@
5660
options.prefix = options.prefix or [""]
5761

5862
try:
59-
params, macros, features = get_config(options.source_dir, target, toolchain)
63+
params, macros, features = get_config(
64+
options.source_dir, target, toolchain)
6065
if not params and not macros:
6166
print("No configuration data available.")
6267
sys.exit(0)

0 commit comments

Comments
 (0)