matej_suchanek created this task. matej_suchanek added projects: Pywikibot-core, Pywikibot-Wikidata, Pywikibot-RfCs. Herald added subscribers: pywikibot-bugs-list, Aklapper. |
TASK DESCRIPTION
Currently, data of claims, qualifiers and references are held in a single class, pywikibot.Claim. I propose to factor things common for all of them to a new class pywikibot.BaseClaim and introduce new classes pywikibot.Qualifier, pywikibot.Reference and pywikibot.ReferenceGroup that would inherit from the base class.
This will have many advantages:
- fixing T186198 will be easier
- input validation (eg. in site.py) will only require assert isinstance()
- pywikibot.Qualifier(repo, 'P123') is simpler and less confusing than pywikibot.Claim(repo, 'P123', isQualifier=True)
Problem: backwards compatibility.
TASK DETAIL
EMAIL PREFERENCES
To: matej_suchanek
Cc: Aklapper, matej_suchanek, pywikibot-bugs-list, Magul, Tbscho, rafidaslam, MayS, Framawiki, Mdupont, JJMC89, Avicennasis, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, Rxy
Cc: Aklapper, matej_suchanek, pywikibot-bugs-list, Magul, Tbscho, rafidaslam, MayS, Framawiki, Mdupont, JJMC89, Avicennasis, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs