| |
@@ -57,8 +57,7 @@
|
| |
argcomplete = None
|
| |
|
| |
parser = argparse.ArgumentParser(
|
| |
- description=HELP_TEXT,
|
| |
- formatter_class=argparse.RawDescriptionHelpFormatter,
|
| |
+ description=HELP_TEXT, formatter_class=argparse.RawDescriptionHelpFormatter,
|
| |
)
|
| |
|
| |
ops = parser.add_argument_group("Operating mode")
|
| |
@@ -103,35 +102,19 @@
|
| |
)
|
| |
|
| |
files.add_argument(
|
| |
- "--sources",
|
| |
- "-S",
|
| |
- action="store_const",
|
| |
- const=True,
|
| |
- default=False,
|
| |
- help="all sources",
|
| |
+ "--sources", "-S", action="store_const", const=True, default=False, help="all sources",
|
| |
)
|
| |
|
| |
files.add_argument(
|
| |
- "--patches",
|
| |
- "-P",
|
| |
- action="store_const",
|
| |
- const=True,
|
| |
- default=False,
|
| |
- help="all patches",
|
| |
+ "--patches", "-P", action="store_const", const=True, default=False, help="all patches",
|
| |
)
|
| |
|
| |
files.add_argument(
|
| |
- "--source",
|
| |
- "-s",
|
| |
- action="store",
|
| |
- help="specified sources",
|
| |
+ "--source", "-s", action="store", help="specified sources",
|
| |
)
|
| |
|
| |
files.add_argument(
|
| |
- "--patch",
|
| |
- "-p",
|
| |
- action="store",
|
| |
- help="specified patches",
|
| |
+ "--patch", "-p", action="store", help="specified patches",
|
| |
)
|
| |
|
| |
misc = parser.add_argument_group("Miscellaneous")
|
| |
@@ -189,10 +172,7 @@
|
| |
help="output debug info, don't clean up when done",
|
| |
)
|
| |
|
| |
- specfile = parser.add_argument(
|
| |
- "specfile",
|
| |
- action="store",
|
| |
- )
|
| |
+ specfile = parser.add_argument("specfile", action="store")
|
| |
|
| |
if argcomplete:
|
| |
specfile.completer = complete_spec_paths
|
| |
@@ -204,7 +184,7 @@
|
| |
|
| |
|
| |
def split_numbers(args: str) -> list:
|
| |
- return list(arg for arg in args.split(","))
|
| |
+ return args.split(",")
|
| |
|
| |
|
| |
def get_file(url: str, path: str, force: bool) -> bool:
|
| |
@@ -336,6 +316,7 @@
|
| |
|
| |
if args["debug"]:
|
| |
import pprint
|
| |
+
|
| |
print("Parsed command line arguments:")
|
| |
pprint.pprint(args)
|
| |
|
| |
@@ -409,9 +390,11 @@
|
| |
if args["directory"]:
|
| |
directory = args["directory"]
|
| |
elif args["sourcedir"]:
|
| |
- ret = subprocess.run(["rpm", "--eval", "%{_sourcedir}"],
|
| |
- stdout=subprocess.PIPE,
|
| |
- stderr=subprocess.STDOUT)
|
| |
+ ret = subprocess.run(
|
| |
+ ["rpm", "--eval", "%{_sourcedir}"],
|
| |
+ stdout=subprocess.PIPE,
|
| |
+ stderr=subprocess.STDOUT,
|
| |
+ )
|
| |
ret.check_returncode()
|
| |
directory = ret.stdout.decode().strip()
|
| |
else:
|
| |
list(arg for arg in args.split(","))
with justargs.split(",")
black -l 100
(88 is too short!)