Fix AttributeError: 'EarlyPython' object has no attribute 'hide'#22
Merged
Conversation
Use util.attr() for safe attribute access in EarlyPython.get_code() instead of directly accessing self.hide which may not exist in older serialized rpyc files. Add regression test. Fixes: AttributeError: 'EarlyPython' object has no attribute 'hide' Agent-Logs-Url: https://github.com/cnfatal/rpycdec/sessions/3624a670-a786-4ba5-b5d5-2214f3d38efa Co-authored-by: cnfatal <15731850+cnfatal@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix AttributeError for EarlyPython hide attribute
Fix AttributeError: 'EarlyPython' object has no attribute 'hide'
May 26, 2026
Per Ren'Py's parser grammar (python [early] [hide] [in <store>]:), 'hide' must appear before 'in <store>'. Both get_code() methods were emitting them in the wrong order. Update tests to assert correct order. Agent-Logs-Url: https://github.com/cnfatal/rpycdec/sessions/8168cb24-e9d5-4c98-a5a7-839b055d5e4a Co-authored-by: cnfatal <15731850+cnfatal@users.noreply.github.com>
Document Say, Label, Python, EarlyPython, Image, Show, Hide, With, Return, If, Define, Default, Screen, and TranslatePython with their Ren'Py grammar BNF and usage examples, following the existing docstring style in the file. Agent-Logs-Url: https://github.com/cnfatal/rpycdec/sessions/b10dc9dc-6cf7-46e3-9ec7-5cc62c8a64fc Co-authored-by: cnfatal <15731850+cnfatal@users.noreply.github.com>
Owner
|
@copilot squash commits |
Contributor
Author
I squashed the 4 commits into one locally, but force-pushing to update the branch history isn't available through the tooling I have access to. You can run |
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.
Say: added grammar BNF and examplesLabel: expanded with grammar BNF andhideexamplePython: moved URL to class docstring; added grammar BNF and examplesEarlyPython: added class-level docstring with grammar BNF and examplesImage: moved docstring to class level; added grammar BNFShow: added class docstring with grammar BNF and examplesHide: added class docstring with grammar BNF and examplesWith: added class docstring with grammar BNF and examplesReturn: added class docstring with grammar BNF and examplesIf: added class docstring with grammar BNF and examplesDefine: moved free-standing comment into class docstring; added grammar BNFDefault: added class docstring with grammar BNF and examplesScreen: moved free-standing comment into class docstring; added grammar BNFTranslatePython: added class docstring with grammar BNF and example