whiTeLeaf-TL / U1bot

一个令人欢喜的娱乐机器
GNU General Public License v3.0
6 stars 3 forks source link

refactor: refactor unnecessary `else` / `elif` when `if` block has a `raise` statement #37

Closed deepsource-autofix[bot] closed 9 months ago

deepsource-autofix[bot] commented 9 months ago

raise causes control flow to be disrupted, as it will exit the block. It is recommended to check other conditions using another if statement, and get rid of else statements as they are unnecessary.