Skip to content

Commit b72118e

Browse files
committed
Import TypeGuard to replace casts
1 parent 59c8944 commit b72118e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

git/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
else:
1212
from typing_extensions import Final, Literal, SupportsIndex, TypedDict # noqa: F401
1313

14+
if sys.version_info[:2] >= (3, 10):
15+
from typing import TypeGuard # noqa: F401
16+
else:
17+
from typing_extensions import TypeGuard # noqa: F401
18+
1419

1520
if sys.version_info[:2] < (3, 9):
1621
# Python >= 3.6, < 3.9

0 commit comments

Comments
 (0)