diff options
author | Yobmod <yobmod@gmail.com> | 2021-06-24 23:45:14 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-06-24 23:45:14 +0100 |
commit | b72118e231c7bc42f457e2b02e0f90e8f87a5794 (patch) | |
tree | 838e55e66238156797e8ee4992d54e43f504f4f7 /git | |
parent | 59c89441fb81b0f4549e4bf7ab01f4c27da54aad (diff) | |
download | gitpython-b72118e231c7bc42f457e2b02e0f90e8f87a5794.tar.gz |
Import TypeGuard to replace casts
Diffstat (limited to 'git')
-rw-r--r-- | git/types.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 |