| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f23994e commit 475a7e1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,22 +6,18 @@ | |||
| 6 | 6 | import os | |
| 7 | 7 | import sys | |
| 8 | 8 | from typing import ( | |
| 9 | - Callable, | ||
| 10 | 9 | Dict, | |
| 11 | 10 | NoReturn, | |
| 12 | 11 | Sequence, | |
| 13 | 12 | Tuple, | |
| 14 | 13 | Union, | |
| 15 | 14 | Any, | |
| 16 | - Iterator, # noqa: F401 | ||
| 17 | - NamedTuple, | ||
| 18 | 15 | TYPE_CHECKING, | |
| 19 | 16 | TypeVar, | |
| 20 | 17 | ) # noqa: F401 | |
| 21 | 18 | ||
| 22 | 19 | if sys.version_info[:2] >= (3, 8): | |
| 23 | 20 | from typing import ( | |
| 24 | - Final, | ||
| 25 | 21 | Literal, | |
| 26 | 22 | SupportsIndex, | |
| 27 | 23 | TypedDict, | |
@@ -30,7 +26,6 @@ | |||
| 30 | 26 | ) # noqa: F401 | |
| 31 | 27 | else: | |
| 32 | 28 | from typing_extensions import ( | |
| 33 | - Final, | ||
| 34 | 29 | Literal, | |
| 35 | 30 | SupportsIndex, # noqa: F401 | |
| 36 | 31 | TypedDict, | |
@@ -45,10 +40,10 @@ | |||
| 45 | 40 | ||
| 46 | 41 | ||
| 47 | 42 | if sys.version_info[:2] < (3, 9): | |
| 48 | - PathLike = Union[str, os.PathLike] | ||
| 49 | - elif sys.version_info[:2] >= (3, 9): | ||
| 43 | + PathLike = Union[str, bytes, os.PathLike] | ||
| 44 | + else: | ||
| 50 | 45 | # os.PathLike only becomes subscriptable from Python 3.9 onwards | |
| 51 | - PathLike = Union[str, os.PathLike] | ||
| 46 | + PathLike = Union[str, bytes, os.PathLike[str], os.PathLike[bytes]] | ||
| 52 | 47 | ||
| 53 | 48 | if TYPE_CHECKING: | |
| 54 | 49 | from git.repo import Repo | |
@@ -92,8 +87,6 @@ def assert_never(inp: NoReturn, raise_error: bool = True, exc: Union[Exception, | |||
| 92 | 87 | raise ValueError(f"An unhandled Literal ({inp}) in an if/else chain was found") | |
| 93 | 88 | else: | |
| 94 | 89 | raise exc | |
| 95 | - else: | ||
| 96 | - pass | ||
| 97 | 90 | ||
| 98 | 91 | ||
| 99 | 92 | class Files_TD(TypedDict): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments