jenkins-bot has submitted this change and it was merged.
Change subject: Remove interwiki_putfirst_doubled
......................................................................
Remove interwiki_putfirst_doubled
Bug: T103093
Change-Id: I24eafe79b9b38a2f4fd83c084293eafe2108a10b
---
M pywikibot/family.py
M pywikibot/site.py
M pywikibot/textlib.py
3 files changed, 0 insertions(+), 28 deletions(-)
Approvals:
John Vandenberg: Looks good to me, but someone else must approve
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/family.py b/pywikibot/family.py
index 467651a..7343d37 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -745,12 +745,6 @@
# order.
self.interwiki_putfirst = {}
- # Languages in interwiki_putfirst_doubled should have a number plus
- # a list of languages. If there are at least the number of interwiki
- # links, all languages in the list should be placed at the front as
- # well as in the normal list.
- self.interwiki_putfirst_doubled = {} # THIS APPEARS TO BE UNUSED!
-
# Some families, e. g. commons and meta, are not multilingual and
# forward interlanguage links to another family (wikipedia).
# These families can set this variable to the name of the target
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 1e18a29..ca340a7 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1005,25 +1005,6 @@
"""Return list of language codes for ordering of interwiki links."""
return self.family.interwiki_putfirst.get(self.code, None)
- def interwiki_putfirst_doubled(self, list_of_links):
- # TODO: is this even needed? No family in the framework has this
- # dictionary defined!
- if self.lang in self.family.interwiki_putfirst_doubled:
- if (len(list_of_links) >=
- self.family.interwiki_putfirst_doubled[self.lang][0]):
- links2 = [lang.language() for lang in list_of_links]
- result = []
- for lang in
self.family.interwiki_putfirst_doubled[self.lang][1]:
- try:
- result.append(list_of_links[links2.index(lang)])
- except ValueError:
- pass
- return result
- else:
- return False
- else:
- return False
-
def getSite(self, code):
"""Return Site object for language 'code' in this Family."""
return pywikibot.Site(code=code, fam=self.family, user=self.user())
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 2fae512..9e3799b 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -936,9 +936,6 @@
del sites[sites.index(site)]
firstsites = firstsites + [site]
sites = firstsites + sites
- if insite.interwiki_putfirst_doubled(sites):
- # some (all?) implementations return False
- sites = insite.interwiki_putfirst_doubled(sites) + sites
return sites
--
To view, visit https://gerrit.wikimedia.org/r/219365
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I24eafe79b9b38a2f4fd83c084293eafe2108a10b
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: XZise <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits