jenkins-bot submitted this change.
[FIX] Use Dict in place of DefaultDict
typing.DefaultDict was introducted in Python 3.5.2
Bug: T257770
Change-Id: Ibf45f955c10f7e3079718754fb634734635e58f5
---
M scripts/delete.py
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/scripts/delete.py b/scripts/delete.py
index 93e0825..0db37bc 100755
--- a/scripts/delete.py
+++ b/scripts/delete.py
@@ -58,7 +58,7 @@
#
import collections
-from typing import DefaultDict, Set
+from typing import Set
from warnings import warn
import pywikibot
@@ -68,7 +68,13 @@
from pywikibot.bot import MultipleSitesBot, CurrentPageBot
from pywikibot.page import Page
from pywikibot.site import Namespace
-from pywikibot.tools import islice_with_ellipsis
+from pywikibot.tools import islice_with_ellipsis, PYTHON_VERSION
+
+if PYTHON_VERSION < (3, 5, 2):
+ from typing import Dict as DefaultDict
+else:
+ from typing import DefaultDict
+
# This is required for the text that is shown when you run this script
# with the parameter -help.
To view, visit change 612146. To unsubscribe, or for help writing mail filters, visit settings.