grpc2py: fix F401 and E261 flake8 violations in generator and generated output#9142
Open
nGoline wants to merge 1 commit into
Open
grpc2py: fix F401 and E261 flake8 violations in generator and generated output#9142nGoline wants to merge 1 commit into
nGoline wants to merge 1 commit into
Conversation
…ed output The generator emitted `import json` in its header template despite json never being referenced in the generated output (F401), and used a single space before three inline `#` comments (E261). Fix by removing the unused import from the template and adding the required second space before each comment. Regenerate the output file accordingly. Changelog-None Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3fd05be to
e482b03
Compare
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.
Summary
contrib/msggen/msggen/gen/grpc2py.py) emittedimport jsonin every generated file's header, butjsonis never referenced in the output (F401 — unused import).#instead of the required two (E261 — inline comment spacing): thedecodekeysend_routes2pyanddecodepay_routes2pymanual-override functions, and theArrayField[primitive]branch ingenerate_composite.contrib/pyln-testing/pyln/testing/grpc2py.py) was regenerated to reflect these fixes.This made it impossible to commit a regenerated
grpc2py.pywithout--no-verify, since the project's own pre-commit flake8 hook rejects the output.Closes #9128
🤖 Generated with Claude Code