jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/505622 )
Change subject: [cleanup] use codes instead of languages_by_size ......................................................................
[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(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
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}
pywikibot-commits@lists.wikimedia.org