jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[IMPR] PEP8 updates

Bug: T305859
Change-Id: Id02144a8ac47085d07a17690252ef248f707669b
---
M scripts/dataextend.py
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/scripts/dataextend.py b/scripts/dataextend.py
index 4dbbda0..23ba6d4 100644
--- a/scripts/dataextend.py
+++ b/scripts/dataextend.py
@@ -15095,31 +15095,37 @@
section = self.getvalue('Life dates', html)
if section:
return self.findbyre(r'(\d{4}) - ', section)
+ return None

def finddeathdate(self, html):
section = self.getvalue('Life dates', html)
if section:
return self.findbyre(r'(\d{4})\s*$', section)
+ return None

def findbirthplace(self, html):
section = self.getvalue('Life dates', html)
if section:
return self.findbyre(r'(.*?), \d{4} - ', section, 'city')
+ return None

def finddeathplace(self, html):
section = self.getvalue('Life dates', html)
if section:
return self.findbyre(r', \d{4} - (.*), \d{4}', section, 'city')
+ return None

def findworkplaces(self, html):
section = self.getvalue('Locations', html)
if section:
return self.findallbyre('([A-Z][^<>]*)', section, 'city')
+ return None

def findgenres(self, html):
section = self.getvalue('Genres / subject matter', html)
if section:
return self.findallbyre('[^<>]+', section, 'art-genre', alt=['genre'])
+ return None

def findmixedrefs(self, html):
return self.finddefaultmixedrefs(html, includesocial=False)
@@ -15131,6 +15137,7 @@
section = self.getvalue('Affiliated entity', html)
if section:
return self.findallbyre('<a [^<>]*>(.*?)<', section, 'organization')
+ return None


class NationalTrustAnalyzer(UrlAnalyzer):
@@ -15154,21 +15161,25 @@
section = self.finddatesection(html)
if section:
return self.findbyre(r'^([\w\s]*?) [\-\d]', section, 'city')
+ return None

def findbirthdate(self, html):
section = self.finddatesection(html)
if section:
return self.findbyre(r' (\d*) -', section)
+ return None

def finddeathplace(self, html):
section = self.finddatesection(html)
if section:
return self.findbyre(r' - ([\w\s]*?)(?: \d|\))', section, 'city')
+ return None

def finddeathdate(self, html):
section = self.finddatesection(html)
if section:
return self.findbyre(r' (\d*)\s*\)', section)
+ return None

def findincollections(self, html):
return self.findallbyre(r'(?s)<label for="[^<>"]+">([^<>]*)</label>\s*<span class="item-bubble">[1-9]', html,
@@ -15274,6 +15285,7 @@
section = self.findbyre(r'"birthPlace":{(.*?)}', html)
if section:
return self.findbyre(r'"name":"(.*?)"', section, 'city')
+ return None

def finddeathdate(self, html):
return self.findbyre(r'"deathDate":"(.*?)"', html)
@@ -15343,6 +15355,7 @@
subsection = self.findbyre(r'(?s)<div class="media-body">(.*?)<', section)
if subsection:
return self.findallbyre(r'([^,]*)', subsection, 'occupation')
+ return None

def findresidences(self, html):
section = self.findbyre(r'(?s)<li class="media residences">(.*?)</li>', html)
@@ -15350,6 +15363,7 @@
subsection = self.findbyre(r'(?s)<div class="media-body">(.*?)<', section)
if subsection:
return self.findallbyre(r'([^,]*)', subsection, 'city')
+ return None


class BacklinkAnalyzer(Analyzer):

To view, visit change 812894. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Id02144a8ac47085d07a17690252ef248f707669b
Gerrit-Change-Number: 812894
Gerrit-PatchSet: 3
Gerrit-Owner: Vivian Rook <vrook@wikimedia.org>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged