Page MenuHomePhabricator

Unnecessary else/elif used after raise
Closed, ResolvedPublic

Description

Introduction

raise causes control flow to be disrupted, as it will exit the block. it is recommended to check other conditions using another if statement.

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:22 PM

May I work on this issue?

Sure

May I work on this issue?

Sure

Sir, I have understood what changes I have to make to solve this issue. Where can I find the repository? I am not able to find it. I would like to work on this issue as soon as possible.
Thanks

May I work on this issue?

Sure

Sir, I have understood what changes I have to make to solve this issue. Where can I find the repository? I am not able to find it. I would like to work on this issue as soon as possible.
Thanks

Hi, it is https://gerrit.wikimedia.org/r/admin/repos/pywikibot/core.

May I work on this issue?

Sure

Sir, I have understood what changes I have to make to solve this issue. Where can I find the repository? I am not able to find it. I would like to work on this issue as soon as possible.
Thanks

Hi, it is https://gerrit.wikimedia.org/r/admin/repos/pywikibot/core.

Thank you so much.

Change 673767 had a related patch set uploaded (by Sahilgrewalhere; owner: Sahilgrewalhere):
[pywikibot/core@master] Removed Unnecessary else/elif used after raise

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

Sir, I am having some issues while creating a Gerrit account.

I am getting this error:
"⧼authmanager-authplugin-create-fail⧽"

I have made the necessary changes. I am working on creating my account.

Change 673775 had a related patch set uploaded (by Sahilgrewalhere; owner: Sahilgrewalhere):
[pywikibot/core@master] Removed Unnecessary else/elif used after raise

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

@Xqt, Can you please help me a little. I am having problems in pushing the changes for code review. I am having this error: "error: failed to push some refs to 'https://gerrit.wikimedia.org/r/pywikibot/core' ".

Change 673775 abandoned by Sahilgrewalhere:
[pywikibot/core@master] Removed Unnecessary else/elif used after raise

Reason:
Duplicate patch of T277890, committed by mistake

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

I am getting this error when I am pushing my changes. Can someone help?
error: failed to push some refs to 'ssh://helix-17@gerrit.wikimedia.org:29418/pywikibot/core'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

It seems there are new changes in the repository. You should first update files in your computer, before uploading your changes to the repository. Make sure you use (git checkout master -> ) git pull ( -> git checkout <your branch name>)

Change 678127 had a related patch set uploaded (by Damian; author: Damian):

[pywikibot/core@master] [cleanup] Unnecessary else/elif used after raise

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

Change 678127 merged by jenkins-bot:

[pywikibot/core@master] [cleanup] Unnecessary else/elif used after raise

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

Change 673767 abandoned by Xqt:

[pywikibot/core@master] Cleared Unnecessary else/elif used after raise

Reason:

no code change after rebase

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

Xqt removed Sahilgrewalhere as the assignee of this task.
Xqt added a subscriber: Sahilgrewalhere.
Xqt updated the task description. (Show Details)
Xqt removed a project: Patch-For-Review.

Reopened. There are 3 remaining issues.

Change 688318 had a related patch set uploaded (by Sahilgrewalhere; author: Sahilgrewalhere):

[pywikibot/core@master] Cleared Unnecessary else/elif used after raise

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

Change 688318 merged by Xqt:

[pywikibot/core@master] Cleared Unnecessary else/elif used after raise

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

Xqt assigned this task to Sahilgrewalhere.
Xqt removed a project: Patch-For-Review.