| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,11 @@ | |||
| 6 | 6 | from mimetypes import guess_type | |
| 7 | 7 | from . import base | |
| 8 | 8 | ||
| 9 | - from git.types import Literal | ||
| 9 | + | ||
| 10 | + try: | ||
| 11 | + from typing import Literal | ||
| 12 | + except ImportError: | ||
| 13 | + from typing_extensions import Literal | ||
| 10 | 14 | ||
| 11 | 15 | __all__ = ("Blob",) | |
| 12 | 16 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -44,7 +44,12 @@ | |||
| 44 | 44 | Dict, | |
| 45 | 45 | ) | |
| 46 | 46 | ||
| 47 | - from git.types import PathLike, Literal | ||
| 47 | + from git.types import PathLike | ||
| 48 | + | ||
| 49 | + try: | ||
| 50 | + from typing import Literal | ||
| 51 | + except ImportError: | ||
| 52 | + from typing_extensions import Literal | ||
| 48 | 53 | ||
| 49 | 54 | if TYPE_CHECKING: | |
| 50 | 55 | from git.repo import Repo | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -44,7 +44,12 @@ | |||
| 44 | 44 | from typing import Callable, Dict, Mapping, Sequence, TYPE_CHECKING, cast | |
| 45 | 45 | from typing import Any, Iterator, Union | |
| 46 | 46 | ||
| 47 | - from git.types import Commit_ish, Literal, PathLike, TBD | ||
| 47 | + from git.types import Commit_ish, PathLike, TBD | ||
| 48 | + | ||
| 49 | + try: | ||
| 50 | + from typing import Literal | ||
| 51 | + except ImportError: | ||
| 52 | + from typing_extensions import Literal | ||
| 48 | 53 | ||
| 49 | 54 | if TYPE_CHECKING: | |
| 50 | 55 | from git.index import IndexFile | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,10 @@ | |||
| 16 | 16 | ||
| 17 | 17 | from typing import List, TYPE_CHECKING, Union | |
| 18 | 18 | ||
| 19 | - from git.types import Literal | ||
| 19 | + try: | ||
| 20 | + from typing import Literal | ||
| 21 | + except ImportError: | ||
| 22 | + from typing_extensions import Literal | ||
| 20 | 23 | ||
| 21 | 24 | if TYPE_CHECKING: | |
| 22 | 25 | from git.repo import Repo | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,12 @@ | |||
| 31 | 31 | TYPE_CHECKING, | |
| 32 | 32 | ) | |
| 33 | 33 | ||
| 34 | - from git.types import PathLike, Literal | ||
| 34 | + from git.types import PathLike | ||
| 35 | + | ||
| 36 | + try: | ||
| 37 | + from typing import Literal | ||
| 38 | + except ImportError: | ||
| 39 | + from typing_extensions import Literal | ||
| 35 | 40 | ||
| 36 | 41 | if TYPE_CHECKING: | |
| 37 | 42 | from git.repo import Repo | |
| Back | FazBrowse Home | New Git URL |
0 commit comments