Xqt added a comment.
Why not use a dict for default sites in user-config like
default_sites = {
'wikipedia': 'de'
'wikisource': 'en'
'wikidata': 'test'
'myownproject': 'klingon'
}
family = 'wikipedia'
mylang = None # maybe obsolete now
-family option will use the default language code except -lang option is given
or there is only one langage in that project.
this means
1. -family overrides config.family
2. if -lang is given, take it and raise an error if site does not exist,
otherwise
3. if default_sites[family] is given, take that language code and raise an
error if site does not exist, otherwise
4. take mylang (as fallback, maybe deprecated) and raise an error if site does
not exist.
This means bot operators may have the choice of the default sites for each
project and if not defined an error would be the right hint. But there would be
no surprise which site is used anymore.
TASK DETAIL
https://phabricator.wikimedia.org/T71255
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign
<username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: m4tx, Xqt
Cc: pywikipedia-bugs, Ladsgroup, jayvdb, Mpaa, Ricordisamoa, XZise, Xqt,
valhallasw, m4tx
_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs