return statement causes the control flow to be disrupted, making the else / elif block here unnecessary. This doesn't mean you can not use it, but it is recommended to refactor this for a better readability. Bad: ```python def classify_number(x): if x % 2 == 0: return 'Even' else: return …
Occurrences
There are 26 occurrences of this issue in the repository.
Description
return
statement causes the control flow to be disrupted, making theelse
/elif
block here unnecessary. This doesn't mean you can not use it, but it is recommended to refactor this for a better readability. Bad: ```python def classify_number(x): if x % 2 == 0: return 'Even' else: return …Occurrences
There are 26 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/argo0n/NograBot/issue/PYL-R1705/occurrences/