jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/705039 )
Change subject: Add Callable and Mapping
......................................................................
Add Callable and Mapping
Also reorder for mypy
Change-Id: Ia3b52160df985b00a2521a06eee607dd0aae282e
---
M pywikibot/backports.py
1 file changed, 14 insertions(+), 4 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/backports.py b/pywikibot/backports.py
index 5bab31d..3689416 100644
--- a/pywikibot/backports.py
+++ b/pywikibot/backports.py
@@ -60,15 +60,25 @@
from collections import OrderedDict
-if PYTHON_VERSION >= (3, 9):
- from collections.abc import Iterable, Sequence
+if PYTHON_VERSION < (3, 9):
+ from typing import (
+ Callable,
+ Dict,
+ FrozenSet,
+ Iterable,
+ List,
+ Mapping,
+ Sequence,
+ Set,
+ Tuple,
+ )
+else:
+ from collections.abc import Callable, Iterable, Mapping, Sequence
Dict = dict
FrozenSet = frozenset
List = list
Set = set
Tuple = tuple
-else:
- from typing import Dict, FrozenSet, Iterable, List, Sequence, Set, Tuple
# PEP 616 string methods
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/705039
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: Ia3b52160df985b00a2521a06eee607dd0aae282e
Gerrit-Change-Number: 705039
Gerrit-PatchSet: 1
Gerrit-Owner: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged