jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/505630 )
Change subject: [IMPR] Simplify month_delta test in apply_month_delta ......................................................................
[IMPR] Simplify month_delta test in apply_month_delta
Change-Id: Iff0679ff62dba9f51be604e55b0bc539fec6beaa --- M pywikibot/date.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: D3r1ck01: Looks good to me, approved jenkins-bot: Verified
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
pywikibot-commits@lists.wikimedia.org