Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/811763 )
Change subject: [IMPR] clean up time.py ......................................................................
[IMPR] clean up time.py
- remove unused variable ZERO - fix type hint
Change-Id: I8a3b64a1188af57949ea9305305efe85f7e58215 --- M pywikibot/time.py 1 file changed, 1 insertion(+), 3 deletions(-)
Approvals: Xqt: Verified; Looks good to me, approved
diff --git a/pywikibot/time.py b/pywikibot/time.py index f3a6d46..0e14332 100644 --- a/pywikibot/time.py +++ b/pywikibot/time.py @@ -34,8 +34,6 @@ # 'months' and 'minutes' were removed because confusion outweighs merit })
-ZERO = datetime.timedelta(0) -
class Timestamp(datetime.datetime):
@@ -211,7 +209,7 @@ msg = "time data '{timestr}' does not match any format." raise ValueError(msg.format(timestr=timestr))
- def clone(self) -> datetime.datetime: + def clone(self) -> 'Timestamp': """Clone this instance.""" return self.replace(microsecond=self.microsecond)
pywikibot-commits@lists.wikimedia.org