Closed Brickblock1 closed 1 month ago
What's the usecase of this would be? I can understand adding more ways to integrate with grf-py argparser like existing commands
argument to grf.main
. But parse_known_args
will only allow making bad cli imo.
I decided to do it like this just to get it working but there may be better ways of doing this
yeah, but what exactly are you trying to get working? like, what arguments do you want to add?
Take a look at robs trains but I just wanted to pass -c to copy the generated file to the newgrf folder
But that -c option only makes sense for build and watch commands. So, even though I'm not against adding custom build options this is not the way to do it.
Currently a project using grf-py can't use argparse on it's own without getting errors due to grf-py not recognising the options. this pr solves that byusing parse_known_args instead of parse_args which would throw an error