Page MenuHomePhabricator

Unnecessary else / elif used after return
Closed, ResolvedPublic

Description

Introduction

return statement causes the control flow to be disrupted, making the else / elif block here unnecessary. This should be refactordd for a better readability.

What to do:

  • The issues are listed here
  • replace elif block with if block
  • decrease nested else block

Important hints

Event Timeline

Xqt triaged this task as Low priority.Mar 19 2021, 5:18 PM
Zabe added a project: User-Zabe.
Zabe subscribed.

Change 673587 had a related patch set uploaded (by Zabe; owner: Zabe):
[pywikibot/core@master] Removal of unnecessary else / elif usage after return

https://gerrit.wikimedia.org/r/673587

Change 673587 merged by jenkins-bot:
[pywikibot/core@master] [cleanup] Removal of unnecessary else / elif usage after return

https://gerrit.wikimedia.org/r/673587

Xqt removed Zabe as the assignee of this task.
Xqt updated the task description. (Show Details)

Reopened. There are 4 remaining issues.

Change 688316 had a related patch set uploaded (by Zabe; author: Zabe):

[pywikibot/core@master] [R1705] Removal of unnecessary else / elif usage after return

https://gerrit.wikimedia.org/r/688316

Zabe claimed this task.

Change 688316 merged by jenkins-bot:

[pywikibot/core@master] [R1705] Removal of unnecessary else / elif usage after return

https://gerrit.wikimedia.org/r/688316