Skip to content

Fix Python emitter command arg handling and restore Check Changes compliance#11026

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-check-changes-job-again
Closed

Fix Python emitter command arg handling and restore Check Changes compliance#11026
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-check-changes-job-again

Conversation

Copilot AI commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

The failing Check Changes job came from an undocumented change in @typespec/http-client-python. While addressing that, this also fixes the underlying emitter bug where transformed options could be re-added as undefined when command args were assembled.

  • Workflow failure

    • Adds the missing Chronus entry for @typespec/http-client-python so pnpm chronus verify --since main recognizes the change.
  • Emitter command arg construction

    • Extracts command arg assembly into a dedicated helper in packages/http-client-python/emitter/src/emitter.ts.
    • Treats transformed options (license, packaging-files-config, keep-pyproject-fields) as handled inputs so they are not copied back into the final arg map.
    • Avoids passing undefined values through the generic option copy path.
  • Regression coverage

    • Adds a focused emitter test covering the transformed-option path, including keep-pyproject-fields and packaging-files-config.
const commandArgs = buildCommandArgs(
  {
    license: "MIT",
    "package-name": "sample-package",
    "packaging-files-config": {
      README: "README.md",
      LICENSE: "LICENSE.txt",
    },
    "keep-pyproject-fields": {
      authors: true,
      description: true,
    },
  },
  false,
);

// preserved transformed args
commandArgs["packaging-files-config"]; // README:README.md|LICENSE:LICENSE.txt
commandArgs["keep-pyproject-fields"]; // authors,description

Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added emitter:client:python Issue for the Python client emitter: @typespec/http-client-python labels Jun 19, 2026
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Check Changes Fix Python emitter command arg handling and restore Check Changes compliance Jun 19, 2026
Copilot AI requested a review from l0lawrence June 19, 2026 16:50
@l0lawrence l0lawrence closed this Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants