Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /promptdriven_pdd /pdd /commands /checkup_simplify.py
| """``pdd checkup simplify`` — multi-provider simplify integration.""" | |
| from __future__ import annotations | |
| from pathlib import Path | |
| from typing import Optional, Tuple | |
| import click | |
| from ..checkup_simplify import run_checkup_simplify | |
| from ..track_cost import track_cost | |
| def checkup_simplify( # pylint: disable=too-many-arguments,too-many-locals | |
| ctx: click.Context, | |
| *, | |
| path: Optional[str], | |
| apply: bool, | |
| since: Optional[str], | |
| staged: bool, | |
| max_files: Optional[int], | |
| attempts: Optional[int], | |
| engine: Optional[str], | |
| evidence: bool, | |
| verify: bool, | |
| no_format: bool, | |
| ) -> Optional[Tuple[str, float, str]]: | |
| """Run simplify over selected source files using the configured engine.""" | |
| if since and staged: | |
| raise click.UsageError("--since and --staged are mutually exclusive.") | |
| target_path = Path(path) if path else None | |
| obj = ctx.obj or {} | |
| try: | |
| result = run_checkup_simplify( | |
| path=target_path, | |
| apply=apply, | |
| since=since, | |
| staged=staged, | |
| max_files=max_files, | |
| attempts=attempts, | |
| engine=engine, | |
| evidence=evidence, | |
| verify=verify, | |
| no_format=no_format, | |
| quiet=bool(obj.get("quiet")), | |
| verbose=bool(obj.get("verbose")), | |
| ) | |
| except ValueError as exc: | |
| raise click.UsageError(str(exc)) from exc | |
| if not obj.get("quiet"): | |
| for line in result.summary_lines: | |
| click.echo(line) | |
| if result.provider and apply: | |
| click.echo(f"\nAgent: {result.provider} Cost: ${result.cost:.4f}") | |
| if result.exit_code: | |
| raise click.exceptions.Exit(result.exit_code) | |
Xet Storage Details
- Size:
- 3.32 kB
- Xet hash:
- fac0b4a442c131917097084c80631eba822f206f651e5a348180daf6cdc81eb1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.