Repository navigation
Round 3 follow-up: split review() further in reviewers/views.py - #563
Merged
Merged
Conversation
My earlier split in #558 (merged) reduced review() from complexity 43 to 16, still 1 over the allowed 15, per re-pull against stage-eks after merge (python:S3776, reviewers/views.py:920). Extracted two more self-contained chunks, both verbatim: - _filter_review_actions(): the actions_full/actions_comments list comprehensions. - _build_whiteboard_form(): the Whiteboard get-or-construct try/except plus the PublicWhiteboardForm/WhiteboardForm class selection. review() keeps its @login_required/@addon_view_factory decorators directly above it, and the "Permission checks for this view..." comment stays directly above those decorators. No behavior change: both extractions are straight body moves with no change to evaluation order or side effects.
|
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.



Part of #450 (round 3).
Sonar issue: python:S3776,
reviewers/views.py:920, complexity 16.My earlier split in thunderbird/addons-server#558 (merged) reduced
review()from complexity 43 to 16 - still 1 over the allowed 15, per re-pull againststage-eksafter merge.Extracted two more self-contained chunks, both verbatim:
_filter_review_actions(): theactions_full/actions_commentslist comprehensions._build_whiteboard_form(): theWhiteboardget-or-constructtry/exceptplus thePublicWhiteboardForm/WhiteboardFormclass selection.review()keeps its@login_required/@addon_view_factorydecorators directly above it, and the "Permission checks for this view..." comment stays directly above those decorators.No behavior change: both extractions are straight body moves with no change to evaluation order or side effects.
Local Greptile review: org free-tier quota exhausted, skipped per coordinator guidance; the Greptile GitHub check on this PR still runs independently.