jenkins-bot has submitted this change and it was merged.
Change subject: Bug 68657-claimit without arguments has no output ......................................................................
Bug 68657-claimit without arguments has no output
Added help output.
Change-Id: I8abeae56052dfa78a1cfbac812987d56ec5ad0f1 --- M scripts/claimit.py M tests/script_tests.py 2 files changed, 9 insertions(+), 2 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/claimit.py b/scripts/claimit.py index af74030..c8140fa 100755 --- a/scripts/claimit.py +++ b/scripts/claimit.py @@ -60,6 +60,12 @@ import pywikibot from pywikibot import pagegenerators, WikidataBot
+# This is required for the text that is shown when you run this script +# with the parameter -help or without parameters. +docuReplacements = { + '¶ms;': pagegenerators.parameterHelp, +} +
class ClaimRobot(WikidataBot): """ @@ -190,7 +196,8 @@
generator = gen.getCombinedGenerator() if not generator: - # FIXME: Should throw some help + # show help text from the top of this file + pywikibot.showHelp() return
bot = ClaimRobot(generator, claims, exists_arg) diff --git a/tests/script_tests.py b/tests/script_tests.py index ef151ed..e631458 100644 --- a/tests/script_tests.py +++ b/tests/script_tests.py @@ -107,6 +107,7 @@ 'archivebot': 'NOTE: you must specify a template to run the bot', 'commonscat': 'add_text.NoEnoughData', 'create_categories': 'No pages to work on', + # TODO: until done here, remember to set editor = None in user_config.py 'editarticle': 'Nothing changed', # This masks related bug 68645 but that # bug is more broadly about config # rather than editarticle. @@ -220,7 +221,6 @@ if script_name in ['add_text', # raises custom NoEnoughData 'checkimages', # bug 68613 'commonscat', # raises custom NoEnoughData - 'claimit', # bug 68657 - zero output 'data_ingestion', # bug 68611 'disambredir', # quittable auto-run with # highly variable output.
pywikibot-commits@lists.wikimedia.org