Skip to content
Snippets Groups Projects

return None as empty optional

Merged Tilman Daab requested to merge fix/consistent-return-type into main

The code quality scan of !720 (merged) complained about "Major - R1710: Either all return statements in a function should return an expression, or none of them should.". As the affected file has not been changed in that merge request, this fix is not appended to that MR but done separately. In python, typing.Optional[A] is equivalent to A or None (https://docs.python.org/3/library/typing.html#typing.Optional, 09.02.2024), i.e., returning None is the appropriate action if no "actual" value is to be returned.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading