Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f01ee4f

Browse filesBrowse files
committed
Apply straight-forward typing fixes
1 parent 3908e79 commit f01ee4f
Copy full SHA for f01ee4f

File tree

Expand file treeCollapse file tree

5 files changed

+8
-8
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+8
-8
lines changed

‎git/cmd.py

Copy file name to clipboardExpand all lines: git/cmd.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def dashify(string: str) -> str:
211211
return string.replace("_", "-")
212212

213213

214-
def slots_to_dict(self: object, exclude: Sequence[str] = ()) -> Dict[str, Any]:
214+
def slots_to_dict(self: "Git", exclude: Sequence[str] = ()) -> Dict[str, Any]:
215215
return {s: getattr(self, s) for s in self.__slots__ if s not in exclude}
216216

217217

‎git/index/base.py

Copy file name to clipboardExpand all lines: git/index/base.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ def _store_path(self, filepath: PathLike, fprogress: Callable) -> BaseIndexEntry
656656
def _entries_for_paths(
657657
self,
658658
paths: List[str],
659-
path_rewriter: Callable,
659+
path_rewriter: Union[Callable, None],
660660
fprogress: Callable,
661661
entries: List[BaseIndexEntry],
662662
) -> List[BaseIndexEntry]:

‎git/index/fun.py

Copy file name to clipboardExpand all lines: git/index/fun.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None:
102102
relative_hp = Path(hp).relative_to(index.repo.working_dir).as_posix()
103103
cmd = ["bash.exe", relative_hp]
104104

105-
cmd = subprocess.Popen(
105+
process = subprocess.Popen(
106106
cmd + list(args),
107107
env=env,
108108
stdout=subprocess.PIPE,
@@ -116,13 +116,13 @@ def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None:
116116
else:
117117
stdout_list: List[str] = []
118118
stderr_list: List[str] = []
119-
handle_process_output(cmd, stdout_list.append, stderr_list.append, finalize_process)
119+
handle_process_output(process, stdout_list.append, stderr_list.append, finalize_process)
120120
stdout = "".join(stdout_list)
121121
stderr = "".join(stderr_list)
122-
if cmd.returncode != 0:
122+
if process.returncode != 0:
123123
stdout = force_text(stdout, defenc)
124124
stderr = force_text(stderr, defenc)
125-
raise HookExecutionError(hp, cmd.returncode, stderr, stdout)
125+
raise HookExecutionError(hp, process.returncode, stderr, stdout)
126126
# end handle return code
127127

128128

‎git/objects/util.py

Copy file name to clipboardExpand all lines: git/objects/util.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def utctz_to_altz(utctz: str) -> int:
147147
return seconds if int_utctz < 0 else -seconds
148148

149149

150-
def altz_to_utctz_str(altz: int) -> str:
150+
def altz_to_utctz_str(altz: float) -> str:
151151
"""Convert a timezone offset west of UTC in seconds into a git timezone offset string
152152
153153
:param altz: timezone offset in seconds west of UTC

‎git/util.py

Copy file name to clipboardExpand all lines: git/util.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ class IterableList(List[T_IterableObj]):
10491049

10501050
__slots__ = ("_id_attr", "_prefix")
10511051

1052-
def __new__(cls, id_attr: str, prefix: str = "") -> "IterableList[IterableObj]":
1052+
def __new__(cls, id_attr: str, prefix: str = "") -> "IterableList[T_IterableObj]":
10531053
return super(IterableList, cls).__new__(cls)
10541054

10551055
def __init__(self, id_attr: str, prefix: str = "") -> None:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.