---
source: crates/ruff_linter/src/rules/flake8_return/mod.rs
---
RET502.py:3:9: RET502 [*] Do not implicitly `return None` in function able to return non-`None` value
  |
1 | def x(y):
2 |     if not y:
3 |         return  # error
  |         ^^^^^^ RET502
4 |     return 1
  |
  = help: Add explicit `None` return value

ℹ Safe fix
1 1 | def x(y):
2 2 |     if not y:
3   |-        return  # error
  3 |+        return None  # error
4 4 |     return 1
5 5 | 
6 6 | 


