Repository navigation
tools: manage.py show names every picture a switch's row carries - #3544
Merged
Merged
Conversation
docs/switches.md lets one row show more than one picture - vpn_pill carries the pill up and the pill at rest - and switches() kept only the first, so `show vpn_pill` printed one of the two pictures the page ships.
|
maintainer-bot review · suggests merge (p3) Thanks for catching that Checks
This is a suggestion; a maintainer makes the final call. A maintainer can comment Reviewed by maintainer-bot · runs on 0G Private Computer |
Owner
|
Thanks @xbsheng, manage.py show now prints every picture a switch's row carries, so vpn_pill and icon_only_vpn show both of theirs, while 'screenshot' stays the first path for other readers. |
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.
manage.py showprinted only the first picture of a switch's row indocs/switches.md, while the page lets a row carry more than one and holds every picture in a row to its rules:show vpn_pillnamedvpn_pill.jpgand nevervpn_pill_rest.jpg, the pill at rest the page draws beside it, andicon_only_vpnlosticon_only_vpn_on.jpgthe same way.switches()now reads every<img src>of a row in page order (img_srcs()), the item keeps them asscreenshotswhilescreenshotstays the first path so everything else that reads an item is unchanged, andshowprints onescreenshot:line per picture - a key with one picture prints exactly what it printed before.Tested on: no TV;
tools/manage.pyagainst the checkout's owndocs/switches.md, unit tests onlyIf this adds or changes a TV list
examples/or atv.jsonis touchedIf this touches the launcher
config.xml, no script on the install or Home pathIf this adds or changes a theme
config.jsonorthemes/README.mdrow is touchedIf this adds a theme key (a switch)
docs/switches.mdis read, not edited (a new row would need a screenshot from a real TV)If this adds an add-on
Two files:
tools/manage.py(+30 -6) andtests/test_manage_show_screenshots.py(new, 13 tests). No launcher Java, list,tv.json, generated table, count, workflow,PROMPT.md,disable.sh/check.pylogic, Home guard or.githubfile touched.Counter-proof, no TV: the new test file alone on
origin/main294d3d5, nothing else changed -> FAILED (failures=4, errors=7), e.g.AssertionError: 'vpn_pill_rest.jpg' not found in '... screenshot: .../vpn_pill.jpg ...' : show printed one of the two pictures docs/switches.md gives vpn_pill, andAssertionError: ['two.jpg', 'two_rest.jpg'] != ['two.jpg'] : show printed one picture of a row that carries two. On this branch the same file is 13 tests OK.Tests:
CLEANYOURTV_STRICT=1 tools/venv/bin/python -m unittest discover -s tests-> 3222 OK (skipped=36) =origin/main294d3d5's own 3209 + 13;tools/venv/bin/python -I tools/gen_tables.py --checkexit 0; no shell changed.Collision: of the 54 open PRs, none touches
tools/manage.py,tests/test_manage_show_screenshots.pyordocs/switches.mdexcept #2954, which appends its own row and picture to that page - a file this PR does not edit.