jenkins-bot submitted this change.
[IMPR] Use self.action != 'login' expression for tuple index
Change-Id: I67c84b4839a120ee5650871751f63df370644d8d
---
M pywikibot/data/api.py
1 file changed, 1 insertion(+), 2 deletions(-)
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:
To view, visit change 634499. To unsubscribe, or for help writing mail filters, visit settings.