#3 Indicate in the --help the default value of the koji url
Merged 4 years ago by nphilipp. Opened 4 years ago by pingou.
fedora-infra/ pingou/rpmautospec default_value  into  master

file modified
+3 -1
@@ -10,7 +10,9 @@ 

  def get_cli_args(args):

      global subcmd_modules_by_name

  

-     parser = argparse.ArgumentParser(prog="rpmautospec")

+     parser = argparse.ArgumentParser(

+         prog="rpmautospec", formatter_class=argparse.ArgumentDefaultsHelpFormatter

+     )

  

      # global arguments

  

Knowing the default value helps building a substitute value if one
wants to point this script to a different koji.
For example, it helps knowing that the URL needs to be to kojihub
and not to the base level domain.

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

Let's make this an f-string.

Metadata Update from @nphilipp:
- Request assigned

4 years ago

Hah, I've just discovered formatter_class=argparse.ArgumentDefaultsHelpFormatter via StackOverflow. Would this be helpful here?

That surely looks promising!

rebased onto a71024de40ed8167ae5974e22cab696df7530c36

4 years ago

rebased onto 9be55ff

4 years ago

Pull-Request has been merged by nphilipp

4 years ago
Metadata