jenkins-bot has submitted this change and it was merged.
Change subject: check argument to removeClaims() so that if single claim is provided it will make a one element list with that claim ......................................................................
check argument to removeClaims() so that if single claim is provided it will make a one element list with that claim
Change-Id: Icc4a842e874f7f6cf341872c305e41b942087163 --- M pywikibot/page.py 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py index 78ce1d0..ca159fd 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -2670,7 +2670,12 @@ """ Removes the claims from the item @type claims: list + """ + # this check allows single claims to be remove by pushing them into a + # list of length one. + if isinstance(claims, pywikibot.Claim): + claims = [claims] self.repo.removeClaims(claims, **kwargs)
pywikibot-commits@lists.wikimedia.org