Page MenuHomePhabricator

rename pagegenerators.GeneratorFactory.handleArg
Closed, ResolvedPublic

Description

Introduction

rename pagegenerators.GeneratorFactory.handleArg() method to handle_arg() due to PEP8 naming convention

What to do:

  • rename handleArg() method of pagegenerators.GeneratorFactory to handle_arg()
  • deprecate the old method with deprecated Decorator (from pywikibot.tools)
  • replace all occurences of this GeneratorFactory.handleArg() with the new identifier. They can be found here

Important hints

  • be aware: GeneratorFactory method is handleArg() not handleArgs() because it processes one option only
  • a similar deprecating solution can be found for handle_args()/handleArgs() function in pywikibot.bot module
  • refer our Coding Convention Guidlines

Event Timeline

Xqt triaged this task as Low priority.Jan 7 2021, 4:43 PM
Xqt updated the task description. (Show Details)

I want to work in this issue please help me to clone repository.I cloned Pywikibot repository from gerrit and i found only these two files

image.png (768×1 px, 114 KB)

what next.
Or i have any mistake please clear

Change 655900 had a related patch set uploaded (by Homeboy 445; owner: Homeboy 445):
[pywikibot/core@master] Renamed handleArg() method to handle_arg() in certain scripts

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

Change 655900 merged by jenkins-bot:
[pywikibot/core@master] Renamed handleArg() method to handle_arg() in certain scripts

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

Xqt reassigned this task from Bharatkhatri351 to Homeboy_445.
Xqt added a subscriber: Bharatkhatri351.

Thanks Homeboy_445!

Reopened. There are still some scripts using the deprecated handleArg() method: https://codesearch.wmcloud.org/pywikibot/?q=handleArg%5C(&i=nope&files=&excludeFiles=&repos=

Xqt updated the task description. (Show Details)
Xqt added a subscriber: Homeboy_445.

Change 656445 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [cleanup] Replace handleArg with handle_arg in pagegenerators_tests.py

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

Change 656445 merged by jenkins-bot:
[pywikibot/core@master] [cleanup] Replace handleArg with handle_arg in pagegenerators_tests.py

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

Change 656537 had a related patch set uploaded (by Aklapper; owner: Bharatkhatri):
[pywikibot/core@master] Rename handleArg to handle_arg

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

Change 656558 had a related patch set uploaded (by Bharatkhatri; owner: Bharatkhatri):
[pywikibot/core@master] Rename handleArg to handle_arg

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

Change 656575 had a related patch set uploaded (by Bharatkhatri; owner: Bharatkhatri):
[pywikibot/core@master] Rename handleArg to handle_arg

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

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

Change 656558 merged by jenkins-bot:
[pywikibot/core@master] Rename handleArg to handle_arg

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

Change 656575 abandoned by Xqt:
[pywikibot/core@master] Rename handleArg to handle_arg

Reason:
Duplicate

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

Change 667542 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [cleanup] Use GeneratorFactory.handle_arg

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

Xqt claimed this task.
Xqt removed Xqt as the assignee of this task.

Change 667542 merged by jenkins-bot:
[pywikibot/core@master] [cleanup] Use GeneratorFactory.handle_arg

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