Skip to content

return None as empty optional

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