jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/376567 )
Change subject: [Doc] Clean up uses of '¶ms;' placeholder
......................................................................
[Doc] Clean up uses of '¶ms;' placeholder
Change-Id: I1fa0410e67c52c22d2391b97155730f45ec64498
---
M scripts/claimit.py
M scripts/coordinate_import.py
M scripts/match_images.py
M scripts/patrol.py
M scripts/revertbot.py
M scripts/script_wui.py
M scripts/surnames_redirects.py
7 files changed, 12 insertions(+), 10 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/scripts/claimit.py b/scripts/claimit.py
index 845ad49..5741732 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -3,6 +3,10 @@
"""
A script that adds claims to Wikidata items based on a list of pages.
+These command line parameters can be used to specify which pages to work on:
+
+¶ms;
+
------------------------------------------------------------------------------
Usage:
diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py
index 41f6b47..1a1f3e0 100755
--- a/scripts/coordinate_import.py
+++ b/scripts/coordinate_import.py
@@ -21,6 +21,8 @@
python pwb.py coordinate_import -lang:it -family:wikipedia \
-namespace:0 -transcludes:Infobox_stazione_ferroviaria
+These command line parameters can be used to specify which pages to work on:
+
¶ms;
"""
#
@@ -35,6 +37,8 @@
from pywikibot import pagegenerators, WikidataBot
from pywikibot.exceptions import CoordinateGlobeUnknownException
+docuReplacements = {'¶ms;': pagegenerators.parameterHelp}
+
class CoordImportRobot(WikidataBot):
diff --git a/scripts/match_images.py b/scripts/match_images.py
index d618bca..b5c8923 100755
--- a/scripts/match_images.py
+++ b/scripts/match_images.py
@@ -9,8 +9,6 @@
It is essential to provide two images to work on.
-¶ms;
-
Furthermore, the following command line parameters are supported:
-otherfamily Mentioned family with this parameter will be preferred for
diff --git a/scripts/patrol.py b/scripts/patrol.py
index bc3bdc9..98de168 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -27,6 +27,8 @@
https://en.wikisource.org/wiki/User:Wikisource-bot/patrol_whitelist
+¶ms;
+
Commandline parameters
======================
diff --git a/scripts/revertbot.py b/scripts/revertbot.py
index d417347..89d8d4b 100755
--- a/scripts/revertbot.py
+++ b/scripts/revertbot.py
@@ -5,8 +5,6 @@
The following command line parameters are supported:
-¶ms;
-
-username Edits of which user need to be reverted.
-rollback Rollback edits instead of reverting them.
diff --git a/scripts/script_wui.py b/scripts/script_wui.py
index e552a4e..839bf24 100755
--- a/scripts/script_wui.py
+++ b/scripts/script_wui.py
@@ -11,12 +11,6 @@
(some code might get compiled on-the-fly, so a GNU compiler along
with library header files is needed too)
-The following parameters are supported:
-
-¶ms;
-
-All other parameters will be ignored.
-
Syntax example:
python pwb.py script_wui -dir:.
diff --git a/scripts/surnames_redirects.py b/scripts/surnames_redirects.py
index d817fda..ab19916 100755
--- a/scripts/surnames_redirects.py
+++ b/scripts/surnames_redirects.py
@@ -28,6 +28,8 @@
from pywikibot import i18n, pagegenerators
from pywikibot.bot import FollowRedirectPageBot, ExistingPageBot
+docuReplacements = {'¶ms;': pagegenerators.parameterHelp}
+
class SurnamesBot(ExistingPageBot, FollowRedirectPageBot):
--
To view, visit https://gerrit.wikimedia.org/r/376567
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1fa0410e67c52c22d2391b97155730f45ec64498
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek <matejsuchanek97(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #4296
Status: Errored
Duration: 4 hours, 23 minutes, and 42 seconds
Commit: 6374cae (master)
Author: dalba
Message: Fix regressions of api.QueryGenerator caused by 64da531a33d13b9ca
Presence of `QueryGenerator._check_result_namespace` is not enough for
calling it; `self._namespaces` must be available, too. Use `_namespaces`
as the condition instead.
Change-Id: Ie0d9bd027222786f969f7fa7660459b5fb810ea5
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/5b1fecbdef0f...6374caec…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/272347216?utm_source=…
--
You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/376061 )
Change subject: Fix regressions of api.QueryGenerator caused by 64da531a33d13b9ca
......................................................................
Fix regressions of api.QueryGenerator caused by 64da531a33d13b9ca
Presence of `QueryGenerator._check_result_namespace` is not enough for
calling it; `self._namespaces` must be available, too. Use `_namespaces`
as the condition instead.
Change-Id: Ie0d9bd027222786f969f7fa7660459b5fb810ea5
---
M pywikibot/data/api.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index c057b67..a88d9e4 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -2816,7 +2816,7 @@
self.normalized = {}
for item in resultdata:
result = self.result(item)
- if self._check_result_namespace is not NotImplemented:
+ if self._namespaces:
if not self._check_result_namespace(result):
continue
yield result
--
To view, visit https://gerrit.wikimedia.org/r/376061
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0d9bd027222786f969f7fa7660459b5fb810ea5
Gerrit-PatchSet: 6
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/366206 )
Change subject: Handle non-items in ItemClaimFilterPageGenerator
......................................................................
Handle non-items in ItemClaimFilterPageGenerator
Now if there are non-items in the generator, we try
to find the item first and then filter on it. However,
we have to abandon preloading since we can no longer
assert that we are working on a list of items.
I have also made the type check weaker, so that other
types of entities are supported as well.
Bug: T137842
Bug: T160396
Bug: T170991
Change-Id: I06851f18d85228d5db77cdec5ed1e07fcda32f7a
---
M pywikibot/pagegenerators.py
1 file changed, 5 insertions(+), 4 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index a38d7d2..bed56fd 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -511,7 +511,6 @@
dupfiltergen, self.subpage_max_depth)
if self.claimfilter_list:
- dupfiltergen = PreloadingItemGenerator(dupfiltergen)
for claim in self.claimfilter_list:
dupfiltergen = ItemClaimFilterPageGenerator(dupfiltergen,
claim[0], claim[1],
@@ -1577,9 +1576,11 @@
@return: true if page contains the claim, false otherwise
@rtype: bool
"""
- if not isinstance(page, pywikibot.ItemPage):
- pywikibot.output(u'%s is not an ItemPage. Skipping.' % page)
- return False
+ if not isinstance(page, pywikibot.WikibasePage):
+ try:
+ page = pywikibot.ItemPage.fromPage(page)
+ except pywikibot.NoPage:
+ return False
for page_claim in page.get()['claims'].get(prop, []):
if page_claim.target_equals(claim):
if not qualifiers:
--
To view, visit https://gerrit.wikimedia.org/r/366206
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I06851f18d85228d5db77cdec5ed1e07fcda32f7a
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek <matejsuchanek97(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: JAn Dudík <jan.dudik(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>