Open sleepwalker2017 opened 1 year ago
my code is like this.
@dataclass class Person: name: str = 'John' age: int = 18 if __name__ == '__main__': import sys print(sys.argv) #main() parser = argparse.ArgumentParser() parser.add_argument('--config_path', type=str) parser.add_argument('hps', nargs=argparse.REMAINDER) args = parser.parse_args() print(args) cfg = pyrallis.parse(Person, config_path = args.config_path, args = args.hps[1:]) print(cfg)
when I run python simple_test.py hps --help, it give right help messages. but when I run python simple_test.py hps -h, it raise an exception.
Is this a bug?
my code is like this.
when I run python simple_test.py hps --help, it give right help messages. but when I run python simple_test.py hps -h, it raise an exception.
Is this a bug?