Conversation
The "Apply auto PEP8 aggressive fixes" commit split several f-strings
across multiple lines with a literal newline inside the {} expression.
That's a hard SyntaxError on any Python before 3.12 (Enigma2 boxes run
3.8/3.9), so analisi_screen.py, archivio_screen.py,
superenalotto_screen.py and dieci_lotto_screen.py failed to import at
all, breaking the whole plugin. Collapsed them back to single-line
f-strings.
main_screen.py imported a function name (aggiorna_archivio) that was
never called, while the names actually called in ok_pressed
(update_archive, download_and_convert_se) were never imported at all -
pressing "Update Lotto Archive" or "Update Superenalotto" raised
NameError. Fixed the imports to match what's actually used.
Also cleaned up dead/broken code found during the audit:
- Removed translate_utils.py, an unused leftover from an unrelated
"Foreca One Weather" plugin that imported a SYSTEM_DIR constant
never defined in this plugin (would ImportError if ever used).
- Removed unused `json` imports in core/update.py and
core/update_superenalotto.py.
- Removed a dead get_archive() call in get_dieci_lotto().
- generate_fake_se_archive() now persists its generated archive via
save_superenalotto_archive(), matching generate_fake_archive()'s
behavior instead of regenerating random fake data on every call.
The script had Windows-style CRLF line terminators, which broke bash parsing on the target box (BusyBox/Enigma2 Linux): '$'\r'': command not found' and a syntax error on the cleanup() function definition. Converted to LF and pinned *.sh to eol=lf in .gitattributes so this can't silently reintroduce itself.
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 "Apply auto PEP8 aggressive fixes" commit split several f-strings
across multiple lines with a literal newline inside the {} expression.
That's a hard SyntaxError on any Python before 3.12 (Enigma2 boxes run
3.8/3.9), so analisi_screen.py, archivio_screen.py,
superenalotto_screen.py and dieci_lotto_screen.py failed to import at
all, breaking the whole plugin. Collapsed them back to single-line
f-strings.
main_screen.py imported a function name (aggiorna_archivio) that was
never called, while the names actually called in ok_pressed
(update_archive, download_and_convert_se) were never imported at all -
pressing "Update Lotto Archive" or "Update Superenalotto" raised
NameError. Fixed the imports to match what's actually used.
Also cleaned up dead/broken code found during the audit:
"Foreca One Weather" plugin that imported a SYSTEM_DIR constant
never defined in this plugin (would ImportError if ever used).
jsonimports in core/update.py andcore/update_superenalotto.py.
save_superenalotto_archive(), matching generate_fake_archive()'s
behavior instead of regenerating random fake data on every call.