Skip to content

Commit

Permalink
Update sorchaargparse.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwamb committed Nov 27, 2024
1 parent 0b2d905 commit 7824633
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/sorcha_cmdline/sorchaargparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ class SorchaArgparse(argparse.ArgumentParser):

def __init__(self, *argv, **kwargs):
super().__init__( **kwargs)


#rename prog to remove the "-" since on the user will write sorcha verb
# but we sneakily run as sorcha-verb so that's confusing when the
# argparse usage or errors print on the terminal. This replacement
# gets around this so all the usage calls match what the user should
# be inputting on the command line
self.prog=self.prog.replace('-', ' ')

def print_usage(self,file=None):
super().print_usage(file)
Expand Down

0 comments on commit 7824633

Please sign in to comment.