| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3908e79 commit f01ee4f
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -211,7 +211,7 @@ def dashify(string: str) -> str: | |||
| 211 | 211 | return string.replace("_", "-") | |
| 212 | 212 | ||
| 213 | 213 | ||
| 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]: | ||
| 215 | 215 | return {s: getattr(self, s) for s in self.__slots__ if s not in exclude} | |
| 216 | 216 | ||
| 217 | 217 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -656,7 +656,7 @@ def _store_path(self, filepath: PathLike, fprogress: Callable) -> BaseIndexEntry | |||
| 656 | 656 | def _entries_for_paths( | |
| 657 | 657 | self, | |
| 658 | 658 | paths: List[str], | |
| 659 | - path_rewriter: Callable, | ||
| 659 | + path_rewriter: Union[Callable, None], | ||
| 660 | 660 | fprogress: Callable, | |
| 661 | 661 | entries: List[BaseIndexEntry], | |
| 662 | 662 | ) -> List[BaseIndexEntry]: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,7 +102,7 @@ def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None: | |||
| 102 | 102 | relative_hp = Path(hp).relative_to(index.repo.working_dir).as_posix() | |
| 103 | 103 | cmd = ["bash.exe", relative_hp] | |
| 104 | 104 | ||
| 105 | - cmd = subprocess.Popen( | ||
| 105 | + process = subprocess.Popen( | ||
| 106 | 106 | cmd + list(args), | |
| 107 | 107 | env=env, | |
| 108 | 108 | stdout=subprocess.PIPE, | |
@@ -116,13 +116,13 @@ def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None: | |||
| 116 | 116 | else: | |
| 117 | 117 | stdout_list: List[str] = [] | |
| 118 | 118 | 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) | ||
| 120 | 120 | stdout = "".join(stdout_list) | |
| 121 | 121 | stderr = "".join(stderr_list) | |
| 122 | - if cmd.returncode != 0: | ||
| 122 | + if process.returncode != 0: | ||
| 123 | 123 | stdout = force_text(stdout, defenc) | |
| 124 | 124 | stderr = force_text(stderr, defenc) | |
| 125 | - raise HookExecutionError(hp, cmd.returncode, stderr, stdout) | ||
| 125 | + raise HookExecutionError(hp, process.returncode, stderr, stdout) | ||
| 126 | 126 | # end handle return code | |
| 127 | 127 | ||
| 128 | 128 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -147,7 +147,7 @@ def utctz_to_altz(utctz: str) -> int: | |||
| 147 | 147 | return seconds if int_utctz < 0 else -seconds | |
| 148 | 148 | ||
| 149 | 149 | ||
| 150 | - def altz_to_utctz_str(altz: int) -> str: | ||
| 150 | + def altz_to_utctz_str(altz: float) -> str: | ||
| 151 | 151 | """Convert a timezone offset west of UTC in seconds into a git timezone offset string | |
| 152 | 152 | ||
| 153 | 153 | :param altz: timezone offset in seconds west of UTC | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1049,7 +1049,7 @@ class IterableList(List[T_IterableObj]): | |||
| 1049 | 1049 | ||
| 1050 | 1050 | __slots__ = ("_id_attr", "_prefix") | |
| 1051 | 1051 | ||
| 1052 | - def __new__(cls, id_attr: str, prefix: str = "") -> "IterableList[IterableObj]": | ||
| 1052 | + def __new__(cls, id_attr: str, prefix: str = "") -> "IterableList[T_IterableObj]": | ||
| 1053 | 1053 | return super(IterableList, cls).__new__(cls) | |
| 1054 | 1054 | ||
| 1055 | 1055 | def __init__(self, id_attr: str, prefix: str = "") -> None: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments