fix: clear ruff F811/F841 findings across frontends and helpers#569
Open
Kailigithub wants to merge 1 commit into
Open
fix: clear ruff F811/F841 findings across frontends and helpers#569Kailigithub wants to merge 1 commit into
Kailigithub wants to merge 1 commit into
Conversation
Resolve all F811 (redefined-while-unused) and F841 (unused-local) issues reported by ruff so the lint baseline is cleaner: - frontends/tui_v3.py: drop a duplicate `from dataclasses import dataclass` line that was shadowed by the very next import; remove the dead `from prompt_toolkit.keys import Keys` block in _ptk_keypress_to_bytes — the symbol was never referenced in the function body, only `getattr(kp, 'key', None)` is used. - frontends/fsapp.py: handle_message unpacks data.event but never reads the event object — rename to `_event` to flag intent. - frontends/genericagent_acp_bridge.py: write_message computed `method` but only logged the payload — embed method in the ACP-BRIDGE log line so the local is used and debugging is easier. - frontends/qtapp.py: drop unused `as e` from an exception handler that already prints via traceback.print_exc(). - frontends/tuiapp.py: drop the unused `args` assignment in main(); parse_args still validates argv and surfaces errors. - memory/autonomous_operation_sop/helper.py: remove an unused `errors` list in complete_task. Verification: - `python3 -m py_compile` on all six files passes. - `ruff check <files> --select F811,F841` reports `All checks passed!`. - No behavioural change; the only logic tweak is the ACP-BRIDGE log gaining a `[method]` prefix.
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.
fix: clear ruff F811/F841 findings across frontends and helpers
Resolve all F811 (redefined-while-unused) and F841 (unused-local) issues
reported by ruff so the lint baseline is cleaner:
from dataclasses import dataclassline that was shadowed by the very next import; remove thedead
from prompt_toolkit.keys import Keysblock in_ptk_keypress_to_bytes — the symbol was never referenced in the
function body, only
getattr(kp, 'key', None)is used.the event object — rename to
_eventto flag intent.methodbut only logged the payload — embed method in the ACP-BRIDGE log line
so the local is used and debugging is easier.
as efrom an exception handler thatalready prints via traceback.print_exc().
argsassignment in main();parse_args still validates argv and surfaces errors.
errorslist in complete_task.
Verification:
python3 -m py_compileon all six files passes.ruff check <files> --select F811,F841reportsAll checks passed!.gaining a
[method]prefix.