Repository navigation
Fix shared settings choice-condition Python lint failure - #1235
Closed
thehobbit85 wants to merge 1 commit into
Closed
thehobbit85 wants to merge 1 commit into
thehobbit85 wants to merge 1 commit into
Conversation
3 tasks done
Contributor
Author
|
Superseded by main f8a5618 (f8a5618). Main now defines offered(v, n) outside the row loop and passes the row number explicitly, eliminating the same B023 capture without a suppression or baseline increase. This PR contains only the one-line default-argument alternative; no distinct change remains. Fresh Ruff B023 on that exact main file passes. The settings file is byte-identical in the rebased diagnostics candidate used for 31 passing documentation/environment/settings/launcher tests, including the affected choice path. Closing as superseded, not merged; the branch is retained. |
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.
Main's Python lint run fails with Ruff B023 at
dm/games/settings.py:115: theoffered()helper introduced by4e0333a5captures the loop's row numbern. The same finding fails unrelated PRs based on main, including #684's run and main's run.Bind the current row number as a default argument when defining the helper. This preserves the current immediate-call behavior, conditional choices, and diagnostic row numbers. No lint suppression or baseline change is included.
Validation on main
975bb4c14456d145eb3d969814534eecdd996ce9, macOS with Python 3.14.6 and the pinned Ruff 0.17.2/Pyright 1.1.414 environment:python -m ruff check --no-cache --select B023 dm/games/settings.pyfails with the exact shared B023 finding.python dm/tools/lint_python.py --against 975bb4c14456d145eb3d969814534eecdd996ce9passes: 389 findings, 389 in the baseline, zero new and zero fixed-but-still-listed findings.python -m unittest dm.tools.tests.test_settings dm.tools.tests.test_launcher_settings: all 19 tests pass, including the Mac-only 120 fps choice, platform defaults, profile conditions and launcher metadata.git diff --checkpasses. The diff is one line in the settings generator; no agent artifacts or operational notes are in the repository.No gameplay or device validation was performed. This is a callback-binding lint correction with no intended launcher behavior change; existing synthetic settings tests cover the affected path. The separate C/Objective-C findings are covered by existing #1207 and are outside this PR. Hosted checks are pending.
Front-ends: none