--path option broken
Running impygen with --path
returns an error:
$ impygen -i goldenCrate.json -o -p test
usage: impygen [-h] [--path PATH] [--version] [--input INPUT] [--naming {NamingStyle.CONTROLLERS_AS_DEVICES,NamingStyle.CONTROLLERS_AS_SUBSYSTEMS}] [--macros {MacrosStyle.SEPARATED_PREFIX,MacrosStyle.SINGLE_PREFIX}] [--opi]
impygen: error: argument --path/-p: can't open 'test': [Errno 21] Is a directory: 'test'
It looks like argparse is set to expect a argparse.FileType()
option (https://gitlab.esss.lu.se/icshwi/impygen/-/blob/main/impygen/init.py#L54), so it tries to open a file and fails if there's nothing there.
Probably using the type pathlib.Path
should fix it
Edited by Henrique Silva