@torsava commented on this pull request.


> +
+
+if __name__ == "__main__":
+    """To allow this script to be importable (and its classes/functions
+       reused), actions are performed only when run as a main script."""
+
+    parser = argparse.ArgumentParser(prog=argv[0])
+    group = parser.add_mutually_exclusive_group(required=True)
+    group.add_argument('-P', '--provides', action='store_true', help='Print 
Provides')
+    group.add_argument('-R', '--requires', action='store_true', help='Print 
Requires')
+    group.add_argument('-r', '--recommends', action='store_true', help='Print 
Recommends')
+    group.add_argument('-C', '--conflicts', action='store_true', help='Print 
Conflicts')
+    group.add_argument('-E', '--extras', action='store_true', help='Print 
Extras')
+    group_majorver = parser.add_mutually_exclusive_group()
+    group_majorver.add_argument('-M', '--majorver-provides', 
action='store_true', help='Print extra Provides with Python major version only')
+    group_majorver.add_argument('--majorver-provides-versions', action='store',

`append` shouldn't be a problem. `extend` however, swallows unlimited number of 
arguments, which could interfere with positional arguments, so I'd rather avoid 
it. How about using `append` and also keeping the option for comma-separated 
entries?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1195#discussion_r415683331
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to