jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/634499 )
Change subject: [IMPR] Use self.action != 'login' expression for tuple index ......................................................................
[IMPR] Use self.action != 'login' expression for tuple index
Change-Id: I67c84b4839a120ee5650871751f63df370644d8d --- M pywikibot/data/api.py 1 file changed, 1 insertion(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index e7be358..0992103 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -2971,8 +2971,7 @@
def keyword(self, key): """Get API keyword from mapping.""" - index = 0 if self.action == 'login' else 1 - return self.mapping[key][index] + return self.mapping[key][self.action != 'login']
@remove_last_args(arg_names=['remember, captchaId, captchaAnswer']) def getCookie(self) -> str:
pywikibot-commits@lists.wikimedia.org