Add --content and deprecated --include-text-files to a subparser.
(p: argparse.ArgumentParser)
| 43 | |
| 44 | |
| 45 | def _add_content_args(p: argparse.ArgumentParser) -> None: |
| 46 | """Add --content and deprecated --include-text-files to a subparser.""" |
| 47 | p.add_argument( |
| 48 | "--content", |
| 49 | nargs="+", |
| 50 | default=["code"], |
| 51 | choices=[ct.value for ct in ContentType] + ["all"], |
| 52 | metavar="TYPE", |
| 53 | help="Content types to index (space-separated, e.g. --content code docs). Choices: code, docs, config, all. Default: code.", |
| 54 | ) |
| 55 | p.add_argument( |
| 56 | "--include-text-files", |
| 57 | action="store_true", |
| 58 | help="Deprecated. Use --content all instead.", |
| 59 | ) |
| 60 | |
| 61 | |
| 62 | def main() -> None: |