colcon / colcon-mixin

Extension for colcon to read CLI mixins from files
http://colcon.readthedocs.io
Apache License 2.0
2 stars 7 forks source link

Suppress type conversion during argument pre-parsing #30

Closed cottsay closed 2 years ago

cottsay commented 3 years ago

When the 'type' argument is specified when calling ArgumentParser.add_argument, a type conversion is performed during the call to ArgumentParser.parse_args. It is normal for this type conversion to raise an exception if the argument is not well-formed.

This extension first parses the arguments to see which mixins should be used, and after operating on that information, performs a 'final' parsing. Since the argument values could change based on the requested mixins, we should delay raising those exceptions until the 'final' parsing invocation.

Requires colcon/colcon-core#416