We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f23994e + 2303971 commit 1c0f307Copy full SHA for 1c0f307
2 files changed
AUTHORS
@@ -46,4 +46,5 @@ Contributors are:
46
-Robert Westman <robert _at_ byteflux.io>
47
-Hugo van Kemenade
48
-Hiroki Tokunaga <tokusan441 _at_ gmail.com>
49
+-Julien Mauroy <pro.julien.mauroy _at_ gmail.com>
50
Portions derived from other open source works and are clearly marked.
git/types.py
@@ -6,22 +6,18 @@
6
import os
7
import sys
8
from typing import (
9
- Callable,
10
Dict,
11
NoReturn,
12
Sequence,
13
Tuple,
14
Union,
15
Any,
16
- Iterator, # noqa: F401
17
- NamedTuple,
18
TYPE_CHECKING,
19
TypeVar,
20
) # noqa: F401
21
22
if sys.version_info[:2] >= (3, 8):
23
24
- Final,
25
Literal,
26
SupportsIndex,
27
TypedDict,
@@ -30,7 +26,6 @@
30
31
else:
32
28
from typing_extensions import (
33
34
29
35
SupportsIndex, # noqa: F401
36
@@ -46,9 +41,9 @@
41
42
if sys.version_info[:2] < (3, 9):
43
PathLike = Union[str, os.PathLike]
-elif sys.version_info[:2] >= (3, 9):
44
+else:
45
# os.PathLike only becomes subscriptable from Python 3.9 onwards
51
- PathLike = Union[str, os.PathLike]
+ PathLike = Union[str, os.PathLike[str]]
52
53
if TYPE_CHECKING:
54
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
94
89
raise exc
95
- else:
96
- pass
97
90
98
91
99
class Files_TD(TypedDict):
0 commit comments