From b72118e231c7bc42f457e2b02e0f90e8f87a5794 Mon Sep 17 00:00:00 2001 From: Yobmod Date: Thu, 24 Jun 2021 23:45:14 +0100 Subject: Import TypeGuard to replace casts --- git/types.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'git') diff --git a/git/types.py b/git/types.py index c01ea27e..e3b49170 100644 --- a/git/types.py +++ b/git/types.py @@ -11,6 +11,11 @@ if sys.version_info[:2] >= (3, 8): else: from typing_extensions import Final, Literal, SupportsIndex, TypedDict # noqa: F401 +if sys.version_info[:2] >= (3, 10): + from typing import TypeGuard # noqa: F401 +else: + from typing_extensions import TypeGuard # noqa: F401 + if sys.version_info[:2] < (3, 9): # Python >= 3.6, < 3.9 -- cgit v1.2.1