jenkins-bot merged this change.
[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.