| matej_suchanek added a comment. |
I am thinking of whether this method is useful for anything but a confusion. If the site should be repo, it is a DataSite. That it's a DataSite you can test via isinstance(). The identity testing in the current APISite.is_data_repository() method is either obsolete (for repos themselves), or it doesn't work (for the mentioned case).
IMO the best solution would be:
- deprecate and remove APISite.is_data_repository()
- always query for the repository
- override DataSite.data_repository() with return self (for better performance)
TASK DETAIL
EMAIL PREFERENCES
To: matej_suchanek
Cc: zhuyifei1999, matej_suchanek, TerraCodes, jayvdb, Ricordisamoa, Aklapper, pywikibot-bugs-list, Pietrodn, Lydia_Pintscher, XZise, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Luke081515, Wesalius, Dalba, Masti, Alchimista, Rxy
Cc: zhuyifei1999, matej_suchanek, TerraCodes, jayvdb, Ricordisamoa, Aklapper, pywikibot-bugs-list, Pietrodn, Lydia_Pintscher, XZise, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Luke081515, Wesalius, Dalba, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
