Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 254305c commit 3347c00Copy full SHA for 3347c00
git/config.py
@@ -41,12 +41,17 @@
41
42
T_ConfigParser = TypeVar('T_ConfigParser', bound='GitConfigParser')
43
44
-if sys.version_info[:2] < (3, 7):
+if sys.version_info[:2] < (3, 7, 2):
45
+ # typing.Ordereddict not added until py 3.7.2
46
from collections import OrderedDict
47
OrderedDict_OMD = OrderedDict
48
+elif sys.version_info[:2] >= (3, 10):
49
+ # then deprecated from 3.10 as collections.OrderedDict was made generic
50
+ from collections import OrderedDict
51
+ OrderedDict_OMD = OrderedDict[str, List[_T]]
52
else:
53
from typing import OrderedDict
- OrderedDict_OMD = OrderedDict[str, List[_T]]
54
+ OrderedDict_OMD = OrderedDict[str, List[_T]] # type: ignore[assignment, misc]
55
56
# -------------------------------------------------------------
57
0 commit comments