jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/616546 )
Change subject: [bugfix] Fix ShouldArchive type
......................................................................
[bugfix] Fix ShouldArchive type
We never put None to whys in PageArchiver, so remove optional
from the declaration and use it explicitly.
Change-Id: I6180e4fdfc65a0d845f5788c327595a9201a3b31
---
M scripts/archivebot.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index b8c81e0..eda4978 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -115,7 +115,7 @@
from pywikibot.tools import issue_deprecation_warning, FrozenDict, deprecated
-ShouldArchive = Optional[Tuple[str, str]]
+ShouldArchive = Tuple[str, str]
Size = Tuple[int, str]
ZERO = datetime.timedelta(0)
@@ -389,7 +389,7 @@
@deprecated('PageArchiver.should_archive_thread(thread)', since='20200727',
future_warning=True)
- def should_be_archived(self, archiver) -> ShouldArchive:
+ def should_be_archived(self, archiver) -> Optional[ShouldArchive]:
"""Check whether thread has to be archived."""
return archiver.should_archive_thread(self)
@@ -589,7 +589,7 @@
if not self.get_attr('archive', ''):
raise MissingConfigError('Missing argument "archive" in template')
- def should_archive_thread(self, thread) -> ShouldArchive:
+ def should_archive_thread(self, thread) -> Optional[ShouldArchive]:
"""
Check whether a thread has to be archived.
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/616546
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I6180e4fdfc65a0d845f5788c327595a9201a3b31
Gerrit-Change-Number: 616546
Gerrit-PatchSet: 2
Gerrit-Owner: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits