jenkins-bot merged this change.

View Change

Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
[cleanup] use codes instead of languages_by_size

- languages_by_size was never sorted by site size but contains the site codes
in alphabetical order. Use codes tuple instead to hold the site codes
- Create a class property for languages_by_size for compatibility purpose

Change-Id: Iea88035ca1590ec9fadbfbcd892556d2dcb689d0
---
M pywikibot/families/wowwiki_family.py
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/pywikibot/families/wowwiki_family.py b/pywikibot/families/wowwiki_family.py
index 55f55ea..c3b6b21 100644
--- a/pywikibot/families/wowwiki_family.py
+++ b/pywikibot/families/wowwiki_family.py
@@ -18,15 +18,21 @@
name = 'wowwiki'
domain = 'wowwiki.fandom.com'

- languages_by_size = [
+ 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'
- ]
+ )

interwiki_removals = ['hr', 'ro', 'sr', 'sv']

@classproperty
+ @deprecated('codes attribute', since='20190422')
+ def languages_by_size(cls):
+ """DEPRECATED. languages_by_size property for compatibility purpose."""
+ return list(cls.codes)
+
+ @classproperty
def langs(cls):
"""Property listing family languages."""
cls.langs = {code: cls.domain for code in cls.codes}

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iea88035ca1590ec9fadbfbcd892556d2dcb689d0
Gerrit-Change-Number: 505622
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: jenkins-bot (75)