jenkins-bot merged this change.

View Change

Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
[bugfix] update wowwiki family file

Change-Id: I43be11f0d9f0a3fab44658ee407e15b350a0d7f7
---
M pywikibot/families/wowwiki_family.py
1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/pywikibot/families/wowwiki_family.py b/pywikibot/families/wowwiki_family.py
index 08129c9..2727a38 100644
--- a/pywikibot/families/wowwiki_family.py
+++ b/pywikibot/families/wowwiki_family.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Family module for WOW Wiki."""
#
-# (C) Pywikibot team, 2009-2019
+# (C) Pywikibot team, 2009-2020
#
# Distributed under the terms of the MIT license.
#
@@ -11,7 +11,7 @@
from pywikibot.tools import deprecated, classproperty


-class Family(family.SubdomainFamily, family.FandomFamily):
+class Family(family.FandomFamily):

"""Family class for WOW Wiki."""

@@ -21,10 +21,10 @@
codes = (
'ar', 'cs', 'da', 'de', 'el', 'en', 'es', 'et', 'fa', 'fi', 'fr', 'he',
'hu', 'is', 'it', 'ja', 'ko', 'lt', 'lv', 'nl', 'nn', 'no', 'pl', 'pt',
- 'pt-br', 'ru', 'sk', 'tr', 'uk', 'zh', 'zh-tw'
+ 'pt-br', 'ru', 'sk', 'sv', 'tr', 'uk', 'zh', 'zh-tw'
)

- removed_wikis = ['hr', 'ro', 'sr', 'sv']
+ removed_wikis = ['hr', 'ro', 'sr']

@classproperty
@deprecated('codes attribute', since='20190422')
@@ -32,12 +32,21 @@
"""DEPRECATED. languages_by_size property for compatibility purpose."""
return list(cls.codes)

+ @deprecated('APISite.version()', since='20141225')
+ def version(self, code):
+ """Return the version for this family."""
+ if code == 'es':
+ return '1.33.1'
+ return super(Family, self).version(code)
+
@classproperty
def langs(cls):
"""Property listing family languages."""
cls.langs = super(Family, cls).langs
- cls.langs.update({code: cls.domains[1] for code in ('es', 'et')})
- cls.langs['uk'] = 'uk.' + cls.domains[2]
+ # override deviations
+ for i, lang in enumerate(['es', 'et', 'sv'], start=1):
+ cls.langs[lang] = cls.domains[i]
+ cls.langs['uk'] = cls.domains[-1]
return cls.langs

@classproperty
@@ -66,16 +75,13 @@
@classproperty
def domains(cls):
"""List of domains used by family wowwiki."""
- return [cls.domain, 'worldofwarcraft.fandom.com', 'warcraft.wikia.com']
-
- def protocol(self, code):
- """Return the protocol for this family."""
- if code == 'uk':
- return 'http'
- return super(Family, self).protocol(code)
+ return [cls.domain,
+ 'wow-es.gamepedia.com', # es
+ 'worldofwarcraft.fandom.com', # et
+ 'warcraft.fandom.com'] # sv, uk

def scriptpath(self, code):
"""Return the script path for this family."""
- if code == 'uk':
+ if code == 'es':
return ''
return super(Family, self).scriptpath(code)

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I43be11f0d9f0a3fab44658ee407e15b350a0d7f7
Gerrit-Change-Number: 572648
Gerrit-PatchSet: 6
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)