Xqt submitted this change.
[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(-)
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)
To view, visit change 811763. To unsubscribe, or for help writing mail filters, visit settings.