Fixes #21411: Enable Ruff RET rules for consistent return behavior #321

Closed
opened 2026-04-05 16:25:50 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @pheus on 2/18/2026

Fixes: #21411

This PR enables Ruff’s RET rules to make return behavior more explicit and consistent across the codebase.

  • Simplifies control flow by removing redundant else blocks after return
  • Adds explicit fallback returns (return None / equivalent) where functions previously relied on implicit fallthrough

No functional changes are intended.

Thanks for reviewing!

*Originally created by @pheus on 2/18/2026* ### Fixes: #21411 This PR enables Ruff’s `RET` rules to make return behavior more explicit and consistent across the codebase. - Simplifies control flow by removing redundant `else` blocks after `return` - Adds explicit fallback returns (`return None` / equivalent) where functions previously relied on implicit fallthrough No functional changes are intended. Thanks for reviewing!
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#321