jenkins-bot merged this change.
[cleanup] pywikibot/site.py: simplify test
The form using a tuple, isinstance(x, (A, B, ...)), is a shortcut for
isinstance(x, A) or isinstance(x, B) or ... (etc.).
Change-Id: I8ffa9da4f37b8851801e404e0c47ca6774dff828
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 0de4971..ea0b4a3 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -5814,9 +5814,9 @@
if all(_ is None for _ in [rcid, revid, revision]):
raise Error('No rcid, revid or revision provided.')
- if isinstance(rcid, int) or isinstance(rcid, basestring):
+ if isinstance(rcid, (int, basestring)):
rcid = {rcid}
- if isinstance(revid, int) or isinstance(revid, basestring):
+ if isinstance(revid, (int, basestring)):
revid = {revid}
if isinstance(revision, pywikibot.page.Revision):
revision = {revision}
To view, visit change 479517. To unsubscribe, or for help writing mail filters, visit settings.