Repository navigation
Fix Python post-processing scope to preserve user-managed files - #12114
Draft
Libba Lawrence (l0lawrence) wants to merge 1 commit into
Draft
Libba Lawrence (l0lawrence) wants to merge 1 commit into
Libba Lawrence (l0lawrence) wants to merge 1 commit into
Conversation
Track successful serializer writes and use them for Black formatting and pylint suppressions across native, Pyodide, and batch generation. Preserve user-managed Python files and add regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
commit: |
|
You can try these changes here
|
Contributor
|
All changed packages have been documented.
Show changes
|
Contributor
Python emitter diffBaseline Diff summary: 1 file(s), +1 / -1 Rendered diff: inline on the run summary, or the emitter-diff-html artifact. Informational check (eng/emitter-diff); does not block the PR. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Python emitter's post-generation steps currently scan the output directory, formatting and adding pylint suppression comments to pre-existing tests, samples, and other user-managed Python files. This change limits those steps to files written during the current generation.
Approach
This post-generation step does not invoke pylint; it inserts suppression comments where necessary. The standalone
pygen.blackcommand now requires explicit filenames. Suppression insertion also preserves stable line endings when extending an existing header.Validation
Includes a fix changelog entry and documentation describing the post-processing scope.
Fixes: #11424