Skip to content

Commit 464848e

Browse files
authored
Update config.py
1 parent d9f140a commit 464848e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

git/config.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@
4141

4242
T_ConfigParser = TypeVar('T_ConfigParser', bound='GitConfigParser')
4343

44-
if sys.version_info[:2] < (3, 7):
45-
from collections import OrderedDict
46-
OrderedDict_OMD = OrderedDict
44+
if sys.version_info[:3] < (3, 7, 2):
45+
# typing.Ordereddict not added until py 3.7.2
46+
from collections import OrderedDict # type: ignore # until 3.6 dropped
47+
OrderedDict_OMD = OrderedDict # type: ignore # until 3.6 dropped
4748
else:
48-
from typing import OrderedDict
49-
OrderedDict_OMD = OrderedDict[str, List[_T]]
49+
from typing import OrderedDict # type: ignore # until 3.6 dropped
50+
OrderedDict_OMD = OrderedDict[str, List[_T]] # type: ignore[assignment, misc]
5051

5152
# -------------------------------------------------------------
5253

0 commit comments

Comments
 (0)