jenkins-bot has submitted this change and it was merged.
Change subject: [IMPROV] Shorten output text and add period at end
......................................................................
[IMPROV] Shorten output text and add period at end
Add a period after each “Skipping” output. Also change texts to remove need for
escaped quotes by not using contractions and bring line lengths of changed
lines below 80 chars.
Change-Id: I4fc39bba945bc8e9badf59b74f90cb7fb6c08a11
---
M scripts/harvest_template.py
1 file changed, 10 insertions(+), 6 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index c131a23..e4a82f3 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -83,7 +83,8 @@
linked_page = pywikibot.Page(link)
if not linked_page.exists():
- pywikibot.output(u'%s doesn\'t exist so it can\'t be linked. Skipping' % (linked_page))
+ pywikibot.output('%s does not exist so it cannot be linked. '
+ 'Skipping.' % (linked_page))
return
if linked_page.isRedirectPage():
@@ -95,11 +96,12 @@
linked_item = None
if not linked_item or not linked_item.exists():
- pywikibot.output(u'%s doesn\'t have a wikidata item to link with. Skipping' % (linked_page))
+ pywikibot.output('%s does not have a wikidata item to link with. '
+ 'Skipping.' % (linked_page))
return
if linked_item.title() == item.title():
- pywikibot.output(u'%s links to itself. Skipping' % (linked_page))
+ pywikibot.output('%s links to itself. Skipping.' % (linked_page))
return
return linked_item
@@ -109,7 +111,8 @@
self.current_page = page
item.get()
if set(self.fields.values()) <= set(item.claims.keys()):
- pywikibot.output(u'%s item %s has claims for all properties. Skipping' % (page, item.title()))
+ pywikibot.output('%s item %s has claims for all properties. '
+ 'Skipping.' % (page, item.title()))
return
pagetext = page.get()
@@ -136,7 +139,7 @@
claim = pywikibot.Claim(self.repo, self.fields[field])
if claim.getID() in item.get().get('claims'):
pywikibot.output(
- u'A claim for %s already exists. Skipping'
+ 'A claim for %s already exists. Skipping.'
% claim.getID())
# TODO: Implement smarter approach to merging
# harvested values with existing claims esp.
@@ -147,7 +150,8 @@
match = re.search(pywikibot.link_regex, value)
if not match:
pywikibot.output(
- u'%s field %s value %s isnt a wikilink. Skipping'
+ '%s field %s value %s is not a '
+ 'wikilink. Skipping.'
% (claim.getID(), field, value))
continue
--
To view, visit https://gerrit.wikimedia.org/r/226054
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4fc39bba945bc8e9badf59b74f90cb7fb6c08a11
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] add_text: Fixed unicode_literals position
......................................................................
[FIX] add_text: Fixed unicode_literals position
In the add_text script, the location of unicode_literals in 1e54a7d6 was added
in the docstring and not the code after it.
Change-Id: Ia23a9abc40c82cc1e1468e902b3812ef347a81c2
---
M scripts/add_text.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Ricordisamoa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/add_text.py b/scripts/add_text.py
index 7c03d85..0fb2f28 100755
--- a/scripts/add_text.py
+++ b/scripts/add_text.py
@@ -41,7 +41,6 @@
# This is a script to add a template to the top of the pages with
# category:catname
# Warning! Put it in one line, otherwise it won't work correctly.
-from __future__ import unicode_literals
python add_text.py -cat:catname -summary:"Bot: Adding a template"
-text:"{{Something}}" -except:"\{\{([Tt]emplate:|)[Ss]omething" -up
@@ -69,6 +68,8 @@
#
# Distributed under the terms of the MIT license.
#
+from __future__ import unicode_literals
+
__version__ = '$Id$'
#
--
To view, visit https://gerrit.wikimedia.org/r/226066
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia23a9abc40c82cc1e1468e902b3812ef347a81c2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [IMPROV] Wrap noautopatrol error message
......................................................................
[IMPROV] Wrap noautopatrol error message
The noautopatrol error message is longer than 100 characters.
Change-Id: Ibcaa551c8968be568a5856e5af32f8b9971cbc3f
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index fc00d47..e8fe41e 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -4877,7 +4877,8 @@
"nosuchrcid": "There is no change with rcid %(rcid)s",
"nosuchrevid": "There is no change with revid %(revid)s",
"patroldisabled": "Patrolling is disabled on %(site)s wiki",
- "noautopatrol": "User %(user)s has no permission to patrol its own changes, 'autopatrol' is needed",
+ "noautopatrol": 'User %(user)s has no permission to patrol its own '
+ 'changes, "autopatrol" is needed',
"notpatrollable": "The revision %(revid)s can't be patrolled as it's too old."
}
--
To view, visit https://gerrit.wikimedia.org/r/225892
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcaa551c8968be568a5856e5af32f8b9971cbc3f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [IMPROV] Improved regex to detect file links
......................................................................
[IMPROV] Improved regex to detect file links
The regex in CosmeticChangesToolkit.fixSyntaxSave in pywikibot.cosmetic_changes
to detect external URLs to certain files is longer than 100 lines. This patch
decreases its line length.
Change-Id: Ibb54bfa89dbd6d0216f7c263e5a5e66894f07880
---
M pywikibot/cosmetic_changes.py
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index c85548c..4176f0c 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -733,9 +733,12 @@
# dash in external link, where the correct end of the URL can
# be detected from the file extension. It is very unlikely that
# this will cause mistakes.
+ extensions = [r'\.{0}'.format(ext)
+ for ext in ['pdf', 'html?', 'php', 'aspx?', 'jsp']]
text = textlib.replaceExcept(
text,
- r'\[(?P<url>https?://[^\|\] ]+?(\.pdf|\.html|\.htm|\.php|\.asp|\.aspx|\.jsp)) *\| *(?P<label>[^\|\]]+?)\]',
+ r'\[(?P<url>https?://[^\|\] ]+?(' + '|'.join(extensions) + r')) *'
+ r'\| *(?P<label>[^\|\]]+?)\]',
r'[\g<url> \g<label>]', exceptions)
return text
--
To view, visit https://gerrit.wikimedia.org/r/225886
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb54bfa89dbd6d0216f7c263e5a5e66894f07880
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [IMPROV] Update comment regarding Plenks
......................................................................
[IMPROV] Update comment regarding Plenks
The comment regarding Plenken in the 'grammer-de' fixes are longer than 100
characters and contain an outdated link.
Change-Id: Iadda383e5bc9b1ff5fe61f0dfea4c61c8f42a936
---
M pywikibot/fixes.py
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/fixes.py b/pywikibot/fixes.py
index 1eb1d91..fb346c8 100644
--- a/pywikibot/fixes.py
+++ b/pywikibot/fixes.py
@@ -116,9 +116,11 @@
(r'([a-zäöüß](\]\])?,)((\[\[)?[a-zäöüA-ZÄÖÜ])', r'\1 \3'),
# Leerzeichen und Komma vertauscht
(r'([a-zäöüß](\]\])?) ,((\[\[)?[a-zäöüA-ZÄÖÜ])', r'\1, \3'),
- # Plenks (d. h. Leerzeichen auch vor dem Komma/Punkt/Ausrufezeichen/Fragezeichen)
- # Achtung bei Französisch: https://de.wikipedia.org/wiki/Plenk#Sonderfall_Franz.C3.B6sisch
- # Leerzeichen vor Doppelpunkt/Semikolon kann korrekt sein, nach irgendeiner Norm für Zitationen.
+ # Plenks (Leerzeichen vor Komma/Punkt/Ausrufezeichen/Fragezeichen)
+ # Achtung bei Französisch:
+ # https://de.wikipedia.org/wiki/Plenk#Franz.C3.B6sische_Sprache
+ # Leerzeichen vor Doppelpunkt/Semikolon kann korrekt sein,
+ # z.B. nach Quellenangaben
(r'([a-zäöüß](\]\])?) ([,.!?]) ((\[\[)?[a-zäöüA-ZÄÖÜ])', r'\1\3 \4'),
# (u'([a-z]\.)([A-Z])', r'\1 \2'),
],
--
To view, visit https://gerrit.wikimedia.org/r/225891
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iadda383e5bc9b1ff5fe61f0dfea4c61c8f42a936
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] config: Removed left over comment
......................................................................
[FIX] config: Removed left over comment
In 7f9e4d72 the automatic detection of the editor on Windows has been rewritten
and one comment was overlooked and left over.
Change-Id: I20c2968584134cde40f13d57df8b3f564b20021c
---
M pywikibot/config2.py
1 file changed, 0 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index bd541a6..2f1d286 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -426,7 +426,6 @@
# The command for the editor you want to use. If set to None, a simple Tkinter
# editor will be used.
editor = os.environ.get('EDITOR', None)
-# On Windows systems, this script tries to determine the default text editor.
# Warning: DO NOT use an editor which doesn't support Unicode to edit pages!
# You will BREAK non-ASCII symbols!
--
To view, visit https://gerrit.wikimedia.org/r/225860
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I20c2968584134cde40f13d57df8b3f564b20021c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #2558
Status: Broken
Duration: 26 minutes and 32 seconds
Commit: 94786cc (2.0)
Author: Fabian Neundorf
Message: [FIX] undelete: Get correct token
The original implementation cdc2e9f4 used `undelete` token and added it as an
old token type. So on new implementations using the CSRF token this worked as
it mapped the token to CSRF. But old versions of MediaWiki which don't use the
CSRF token yet it'll fail because that token never existed.
The change in d4e6e60c broke then this also on newer versions as it only mapped
old token names to the CSRF token if they were actually old token name. And
that is not the case for `undelete` so it wasn't mapped to CSRF.
With 730bad3f the tokens for `delete` and `undelete` are the same and so it can
just use the `delete` token which will be mapped to CSRF on recent versions.
Bug: T105635
Change-Id: I9419aac0bc590fd3a3ed484012608f25dcf01cea
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/170b9a9fc5b5...94786cce…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/71650083
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications