| 526 | |
| 527 | class CombineIncludePaths(argparse.Action): |
| 528 | def __call__(self, parser, namespace, values, option_string=None): |
| 529 | include_paths_set = set(getattr(namespace, 'include_paths', []) or []) |
| 530 | if option_string == "--include_paths": |
| 531 | outmess("Use --include-paths or -I instead of --include_paths which will be removed") |
| 532 | if option_string == "--include-paths" or option_string == "--include_paths": |
| 533 | include_paths_set.update(values.split(':')) |
| 534 | else: |
| 535 | include_paths_set.add(values) |
| 536 | setattr(namespace, 'include_paths', list(include_paths_set)) |
| 537 | |
| 538 | def include_parser(): |
| 539 | parser = argparse.ArgumentParser(add_help=False) |