jenkins-bot submitted this change.
Add Callable and Mapping
Also reorder for mypy
Change-Id: Ia3b52160df985b00a2521a06eee607dd0aae282e
---
M pywikibot/backports.py
1 file changed, 14 insertions(+), 4 deletions(-)
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 change 705039. To unsubscribe, or for help writing mail filters, visit settings.