FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Import TypeGuard to replace casts · gitpython-developers/GitPython@b72118e · GitHub

Repository navigation

Commit b72118e

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

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎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)

Back | FazBrowse Home | New Git URL