Skip to content

Round 3 follow-up: split review() further in reviewers/views.py - #563

Merged
mzeier merged 1 commit into
stage-eksfrom
450/py-r3-reviewers-followup
Oct 10, 2026
Merged

mzeier merged 1 commit into
stage-eksfrom
450/py-r3-reviewers-followup

Conversation

@mzeier

@mzeier mzeier commented Oct 10, 2026

Copy link
Copy Markdown

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 against stage-eks after merge.

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.

Local Greptile review: org free-tier quota exhausted, skipped per coordinator guidance; the Greptile GitHub check on this PR still runs independently.

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.
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Python Test Results

5 763 tests  +5 763   5 709 ✅ +5 709   11m 40s ⏱️ + 11m 40s
    1 suites +    1      54 💤 +   54 
    1 files   +    1       0 ❌ ±    0 

Results for commit 7fec45c. ± Comparison against base commit e7d5a2b.

@mzeier
mzeier merged commit 274463f into stage-eks Oct 10, 2026
3 checks passed
@mzeier
mzeier deleted the 450/py-r3-reviewers-followup branch October 10, 2026 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant