Skip to content

Argument Clinic: add --dry-run and --diff options #155207

Closed

Description

@serhiy-storchaka

Feature or enhancement

Argument Clinic can only rewrite files in place. To see what a change to a clinic block or to the generator itself produces, you have to let it modify the working tree and then look at git diff.

I propose two options, one of the ideas listed in #108643:

  • --dry-run -- parse everything as usual, but write nothing and list the files which would be changed.
  • --diff -- the same, but write a unified diff of the changes to the standard output, so that it can be reviewed or applied with patch -p0.

Both work with --make, so --dry-run --make --srcdir . tells whether any generated file is stale.

Linked PRs

Activity

  1. added 2 commits that reference this issue on Aug 5, 2026
  2. added 2 commits that reference this issue on Aug 5, 2026
  3. added
    3.13only security fixes
    3.14bugs and security fixes
    3.15bugs and security fixes
    3.16new features, bugs and security fixes
    on Aug 5, 2026
  4. added a commit that references this issue on Aug 5, 2026
  5. added a commit that references this issue on Aug 5, 2026
  6. added a commit that references this issue on Aug 14, 2026
  7. added a commit that references this issue on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixes3.14bugs and security fixes3.15bugs and security fixes3.16new features, bugs and security fixestopic-argument-clinictype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions