cleanup: remove dead code and improve readability in NotifyTask [5/6] #698
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.
Summary
Cleanup PR stacked on the NotifyTask refactoring PRs (#696, #697). Addresses readability issues and dead code in
notify.py.Changes
GENERIC_TA_ERROR_MSGconstant — defined on module level but never referenced anywhere in the codebaselog.infocall inrun_impl— the trailing comma and outer parentheses accidentally created a single-element tuple wrapping the log call ((log.info(...),)), which works but is confusing to read"User doesnt want notifications warning them that current head differs from pull request most recent head."with the snake_case key"commit_not_pull_head"to match all other reason strings in the file (e.g."no_head_report","test_failures","no_valid_bot")ta_error_msgvariable — the variable was alwaysNone(with a comment saying "TA error messaging is disabled for now") and was threaded through_prepare_and_send_notificationstosubmit_third_party_notifications. Sincetest_results_erroralready defaults toNone, we can skip the plumbing entirely.Test plan
ruff checkandruff formatpassMade with Cursor