jenkins-bot merged this change.
[IMPR] Simplify month_delta test in apply_month_delta
Change-Id: Iff0679ff62dba9f51be604e55b0bc539fec6beaa
---
M pywikibot/date.py
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pywikibot/date.py b/pywikibot/date.py
index fb761cb..aecefd1 100644
--- a/pywikibot/date.py
+++ b/pywikibot/date.py
@@ -2360,7 +2360,7 @@
@return: The end date
@rtype: type of date
"""
- if int(month_delta) != month_delta:
+ if not isinstance(month_delta, int):
raise ValueError('Month delta must be an integer')
month = (date.month - 1) + month_delta
year = date.year + month // 12
To view, visit change 505630. To unsubscribe, or for help writing mail filters, visit settings.