Skip to content

Commit 677e01a

Browse files
committed
Apply new black changes
But this breaks flake8.
1 parent 4cf96f9 commit 677e01a

File tree

7 files changed

+31
-57
lines changed

7 files changed

+31
-57
lines changed

git/cmd.py

+12-20
Original file line numberDiff line numberDiff line change
@@ -563,13 +563,11 @@ def is_cygwin(cls) -> bool:
563563

564564
@overload
565565
@classmethod
566-
def polish_url(cls, url: str, is_cygwin: Literal[False] = ...) -> str:
567-
...
566+
def polish_url(cls, url: str, is_cygwin: Literal[False] = ...) -> str: ...
568567

569568
@overload
570569
@classmethod
571-
def polish_url(cls, url: str, is_cygwin: Union[None, bool] = None) -> str:
572-
...
570+
def polish_url(cls, url: str, is_cygwin: Union[None, bool] = None) -> str: ...
573571

574572
@classmethod
575573
def polish_url(cls, url: str, is_cygwin: Union[None, bool] = None) -> PathLike:
@@ -930,8 +928,7 @@ def execute(
930928
command: Union[str, Sequence[Any]],
931929
*,
932930
as_process: Literal[True],
933-
) -> "AutoInterrupt":
934-
...
931+
) -> "AutoInterrupt": ...
935932

936933
@overload
937934
def execute(
@@ -940,8 +937,7 @@ def execute(
940937
*,
941938
as_process: Literal[False] = False,
942939
stdout_as_string: Literal[True],
943-
) -> Union[str, Tuple[int, str, str]]:
944-
...
940+
) -> Union[str, Tuple[int, str, str]]: ...
945941

946942
@overload
947943
def execute(
@@ -950,8 +946,7 @@ def execute(
950946
*,
951947
as_process: Literal[False] = False,
952948
stdout_as_string: Literal[False] = False,
953-
) -> Union[bytes, Tuple[int, bytes, str]]:
954-
...
949+
) -> Union[bytes, Tuple[int, bytes, str]]: ...
955950

956951
@overload
957952
def execute(
@@ -961,8 +956,7 @@ def execute(
961956
with_extended_output: Literal[False],
962957
as_process: Literal[False],
963958
stdout_as_string: Literal[True],
964-
) -> str:
965-
...
959+
) -> str: ...
966960

967961
@overload
968962
def execute(
@@ -972,8 +966,7 @@ def execute(
972966
with_extended_output: Literal[False],
973967
as_process: Literal[False],
974968
stdout_as_string: Literal[False],
975-
) -> bytes:
976-
...
969+
) -> bytes: ...
977970

978971
def execute(
979972
self,
@@ -1385,8 +1378,9 @@ def __call__(self, **kwargs: Any) -> "Git":
13851378
return self
13861379

13871380
@overload
1388-
def _call_process(self, method: str, *args: None, **kwargs: None) -> str:
1389-
... # If no args were given, execute the call with all defaults.
1381+
def _call_process(
1382+
self, method: str, *args: None, **kwargs: None
1383+
) -> str: ... # If no args were given, execute the call with all defaults.
13901384

13911385
@overload
13921386
def _call_process(
@@ -1396,14 +1390,12 @@ def _call_process(
13961390
as_process: Literal[True],
13971391
*args: Any,
13981392
**kwargs: Any,
1399-
) -> "Git.AutoInterrupt":
1400-
...
1393+
) -> "Git.AutoInterrupt": ...
14011394

14021395
@overload
14031396
def _call_process(
14041397
self, method: str, *args: Any, **kwargs: Any
1405-
) -> Union[str, bytes, Tuple[int, Union[str, bytes], str], "Git.AutoInterrupt"]:
1406-
...
1398+
) -> Union[str, bytes, Tuple[int, Union[str, bytes], str], "Git.AutoInterrupt"]: ...
14071399

14081400
def _call_process(
14091401
self, method: str, *args: Any, **kwargs: Any

git/compat.py

+6-12
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,11 @@
6969

7070

7171
@overload
72-
def safe_decode(s: None) -> None:
73-
...
72+
def safe_decode(s: None) -> None: ...
7473

7574

7675
@overload
77-
def safe_decode(s: AnyStr) -> str:
78-
...
76+
def safe_decode(s: AnyStr) -> str: ...
7977

8078

8179
def safe_decode(s: Union[AnyStr, None]) -> Optional[str]:
@@ -91,13 +89,11 @@ def safe_decode(s: Union[AnyStr, None]) -> Optional[str]:
9189

9290

9391
@overload
94-
def safe_encode(s: None) -> None:
95-
...
92+
def safe_encode(s: None) -> None: ...
9693

9794

9895
@overload
99-
def safe_encode(s: AnyStr) -> bytes:
100-
...
96+
def safe_encode(s: AnyStr) -> bytes: ...
10197

10298

10399
def safe_encode(s: Optional[AnyStr]) -> Optional[bytes]:
@@ -113,13 +109,11 @@ def safe_encode(s: Optional[AnyStr]) -> Optional[bytes]:
113109

114110

115111
@overload
116-
def win_encode(s: None) -> None:
117-
...
112+
def win_encode(s: None) -> None: ...
118113

119114

120115
@overload
121-
def win_encode(s: AnyStr) -> bytes:
122-
...
116+
def win_encode(s: AnyStr) -> bytes: ...
123117

124118

125119
def win_encode(s: Optional[AnyStr]) -> Optional[bytes]:

git/objects/fun.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,11 @@ def _find_by_name(tree_data: MutableSequence[EntryTupOrNone], name: str, is_dir:
152152

153153

154154
@overload
155-
def _to_full_path(item: None, path_prefix: str) -> None:
156-
...
155+
def _to_full_path(item: None, path_prefix: str) -> None: ...
157156

158157

159158
@overload
160-
def _to_full_path(item: EntryTup, path_prefix: str) -> EntryTup:
161-
...
159+
def _to_full_path(item: EntryTup, path_prefix: str) -> EntryTup: ...
162160

163161

164162
def _to_full_path(item: EntryTupOrNone, path_prefix: str) -> EntryTupOrNone:

git/objects/tree.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class Tree(IndexObject, git_diff.Diffable, util.Traversable, util.Serializable):
183183
_map_id_to_type: Dict[int, Type[IndexObjUnion]] = {
184184
commit_id: Submodule,
185185
blob_id: Blob,
186-
symlink_id: Blob
186+
symlink_id: Blob,
187187
# Tree ID added once Tree is defined.
188188
}
189189

git/objects/util.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,7 @@ def list_traverse(self: T_TIobj, *args: Any, **kwargs: Any) -> IterableList[T_TI
620620
return super()._list_traverse(*args, **kwargs)
621621

622622
@overload # type: ignore
623-
def traverse(self: T_TIobj) -> Iterator[T_TIobj]:
624-
...
623+
def traverse(self: T_TIobj) -> Iterator[T_TIobj]: ...
625624

626625
@overload
627626
def traverse(
@@ -633,8 +632,7 @@ def traverse(
633632
visit_once: bool,
634633
ignore_self: Literal[True],
635634
as_edge: Literal[False],
636-
) -> Iterator[T_TIobj]:
637-
...
635+
) -> Iterator[T_TIobj]: ...
638636

639637
@overload
640638
def traverse(
@@ -646,8 +644,7 @@ def traverse(
646644
visit_once: bool,
647645
ignore_self: Literal[False],
648646
as_edge: Literal[True],
649-
) -> Iterator[Tuple[Union[T_TIobj, None], T_TIobj]]:
650-
...
647+
) -> Iterator[Tuple[Union[T_TIobj, None], T_TIobj]]: ...
651648

652649
@overload
653650
def traverse(
@@ -659,8 +656,7 @@ def traverse(
659656
visit_once: bool,
660657
ignore_self: Literal[True],
661658
as_edge: Literal[True],
662-
) -> Iterator[Tuple[T_TIobj, T_TIobj]]:
663-
...
659+
) -> Iterator[Tuple[T_TIobj, T_TIobj]]: ...
664660

665661
def traverse(
666662
self: T_TIobj,

git/remote.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,15 @@ def add_progress(
9393

9494

9595
@overload
96-
def to_progress_instance(progress: None) -> RemoteProgress:
97-
...
96+
def to_progress_instance(progress: None) -> RemoteProgress: ...
9897

9998

10099
@overload
101-
def to_progress_instance(progress: Callable[..., Any]) -> CallableRemoteProgress:
102-
...
100+
def to_progress_instance(progress: Callable[..., Any]) -> CallableRemoteProgress: ...
103101

104102

105103
@overload
106-
def to_progress_instance(progress: RemoteProgress) -> RemoteProgress:
107-
...
104+
def to_progress_instance(progress: RemoteProgress) -> RemoteProgress: ...
108105

109106

110107
def to_progress_instance(

git/util.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -441,13 +441,11 @@ def decygpath(path: PathLike) -> str:
441441

442442

443443
@overload
444-
def is_cygwin_git(git_executable: None) -> Literal[False]:
445-
...
444+
def is_cygwin_git(git_executable: None) -> Literal[False]: ...
446445

447446

448447
@overload
449-
def is_cygwin_git(git_executable: PathLike) -> bool:
450-
...
448+
def is_cygwin_git(git_executable: PathLike) -> bool: ...
451449

452450

453451
def is_cygwin_git(git_executable: Union[None, PathLike]) -> bool:
@@ -494,8 +492,7 @@ def finalize_process(proc: Union[subprocess.Popen, "Git.AutoInterrupt"], **kwarg
494492

495493

496494
@overload
497-
def expand_path(p: None, expand_vars: bool = ...) -> None:
498-
...
495+
def expand_path(p: None, expand_vars: bool = ...) -> None: ...
499496

500497

501498
@overload

0 commit comments

Comments
 (0)