Skip to content

Commit 5266521

Browse files
committed
Put protocol behind py version check
1 parent 1b69965 commit 5266521

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

‎git/types.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@
66
import sys
77
from typing import Dict, Union, Any, TYPE_CHECKING
88

9-
if sys.version_info[:2] >= (3, 7):
10-
from typing import Protocol # noqa: F401
11-
else:
12-
from typing_extensions import Protocol # noqa: F401
139

1410
if sys.version_info[:2] >= (3, 8):
15-
from typing import Final, Literal, SupportsIndex, TypedDict # noqa: F401
11+
from typing import Final, Literal, SupportsIndex, TypedDict, Protocol # noqa: F401
1612
else:
17-
from typing_extensions import Final, Literal, SupportsIndex, TypedDict # noqa: F401
13+
from typing_extensions import Final, Literal, SupportsIndex, TypedDict, Protocol # noqa: F401
1814

1915
if sys.version_info[:2] >= (3, 10):
2016
from typing import TypeGuard # noqa: F401

0 commit comments

Comments
 (0)