Skip to content

[Parser] Clean up unused variables and emitted semicolons in asdl_c.py#151455

Closed
CoderSilicon wants to merge 4 commits into
python:mainfrom
CoderSilicon:patch-1
Closed

[Parser] Clean up unused variables and emitted semicolons in asdl_c.py#151455
CoderSilicon wants to merge 4 commits into
python:mainfrom
CoderSilicon:patch-1

Conversation

@CoderSilicon

Copy link
Copy Markdown

Summary

This PR cleans up the code inside Parser/asdl_c.py by removing unused variable assignments that were cluttering the function scopes, and refactors trailing string-literal formatting to eliminate unneeded emitted semicolons in the generated AST output definitions.

Details

  • Removed all unused trailing semicolons.
  • Removed dead local variables inside AST node-visitor methods.
  • Cleaned up redundant syntax emissions to make the generated C files more compliant.
  • No corresponding tracking issue is attached as these are trivial code layout optimizations.

@python-cla-bot

python-cla-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Jun 13, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@StanFromIreland

StanFromIreland commented Jun 13, 2026

Copy link
Copy Markdown
Member

Hello, as noted in the devguide, we do not accept PRs proposing solely cosmetic changes, this includes running a linter. Sorry, but I'm closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants