| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -528,13 +528,13 @@ def _terminate(self) -> None: | |||
| 528 | 528 | try: | |
| 529 | 529 | if proc.poll() is not None: | |
| 530 | 530 | self.status = self._status_code_if_terminate or proc.poll() | |
| 531 | - return None | ||
| 531 | + return | ||
| 532 | 532 | except OSError as ex: | |
| 533 | 533 | log.info("Ignored error after process had died: %r", ex) | |
| 534 | 534 | ||
| 535 | 535 | # It can be that nothing really exists anymore... | |
| 536 | 536 | if os is None or getattr(os, "kill", None) is None: | |
| 537 | - return None | ||
| 537 | + return | ||
| 538 | 538 | ||
| 539 | 539 | # Try to kill it. | |
| 540 | 540 | try: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -203,7 +203,8 @@ def __setitem__(self, key: str, value: _T) -> None: | |||
| 203 | 203 | def add(self, key: str, value: Any) -> None: | |
| 204 | 204 | if key not in self: | |
| 205 | 205 | super().__setitem__(key, [value]) | |
| 206 | - return None | ||
| 206 | + return | ||
| 207 | + | ||
| 207 | 208 | super().__getitem__(key).append(value) | |
| 208 | 209 | ||
| 209 | 210 | def setall(self, key: str, values: List[_T]) -> None: | |
@@ -579,7 +580,7 @@ def read(self) -> None: # type: ignore[override] | |||
| 579 | 580 | :raise IOError: If a file cannot be handled | |
| 580 | 581 | """ | |
| 581 | 582 | if self._is_initialized: | |
| 582 | - return None | ||
| 583 | + return | ||
| 583 | 584 | self._is_initialized = True | |
| 584 | 585 | ||
| 585 | 586 | files_to_read: List[Union[PathLike, IO]] = [""] | |
@@ -697,7 +698,7 @@ def write(self) -> None: | |||
| 697 | 698 | a file lock""" | |
| 698 | 699 | self._assure_writable("write") | |
| 699 | 700 | if not self._dirty: | |
| 700 | - return None | ||
| 701 | + return | ||
| 701 | 702 | ||
| 702 | 703 | if isinstance(self._file_or_files, (list, tuple)): | |
| 703 | 704 | raise AssertionError( | |
@@ -711,7 +712,7 @@ def write(self) -> None: | |||
| 711 | 712 | "Skipping write-back of configuration file as include files were merged in." | |
| 712 | 713 | + "Set merge_includes=False to prevent this." | |
| 713 | 714 | ) | |
| 714 | - return None | ||
| 715 | + return | ||
| 715 | 716 | # END stop if we have include files | |
| 716 | 717 | ||
| 717 | 718 | fp = self._file_or_files | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -166,7 +166,7 @@ def _set_cache_(self, attr: str) -> None: | |||
| 166 | 166 | except OSError: | |
| 167 | 167 | # In new repositories, there may be no index, which means we are empty. | |
| 168 | 168 | self.entries: Dict[Tuple[PathLike, StageType], IndexEntry] = {} | |
| 169 | - return None | ||
| 169 | + return | ||
| 170 | 170 | # END exception handling | |
| 171 | 171 | ||
| 172 | 172 | try: | |
@@ -1210,9 +1210,9 @@ def checkout( | |||
| 1210 | 1210 | def handle_stderr(proc: "Popen[bytes]", iter_checked_out_files: Iterable[PathLike]) -> None: | |
| 1211 | 1211 | stderr_IO = proc.stderr | |
| 1212 | 1212 | if not stderr_IO: | |
| 1213 | - return None # Return early if stderr empty. | ||
| 1214 | - else: | ||
| 1215 | - stderr_bytes = stderr_IO.read() | ||
| 1213 | + return # Return early if stderr empty. | ||
| 1214 | + | ||
| 1215 | + stderr_bytes = stderr_IO.read() | ||
| 1216 | 1216 | # line contents: | |
| 1217 | 1217 | stderr = stderr_bytes.decode(defenc) | |
| 1218 | 1218 | # git-checkout-index: this already exists | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -83,7 +83,7 @@ def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None: | |||
| 83 | 83 | """ | |
| 84 | 84 | hp = hook_path(name, index.repo.git_dir) | |
| 85 | 85 | if not os.access(hp, os.X_OK): | |
| 86 | - return None | ||
| 86 | + return | ||
| 87 | 87 | ||
| 88 | 88 | env = os.environ.copy() | |
| 89 | 89 | env["GIT_INDEX_FILE"] = safe_decode(str(index.path)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -68,7 +68,7 @@ def git_cmp(t1: TreeCacheTup, t2: TreeCacheTup) -> int: | |||
| 68 | 68 | ||
| 69 | 69 | def merge_sort(a: List[TreeCacheTup], cmp: Callable[[TreeCacheTup, TreeCacheTup], int]) -> None: | |
| 70 | 70 | if len(a) < 2: | |
| 71 | - return None | ||
| 71 | + return | ||
| 72 | 72 | ||
| 73 | 73 | mid = len(a) // 2 | |
| 74 | 74 | lefthalf = a[:mid] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -500,8 +500,8 @@ def addToStack( | |||
| 500 | 500 | depth: int, | |
| 501 | 501 | ) -> None: | |
| 502 | 502 | lst = self._get_intermediate_items(item) | |
| 503 | - if not lst: # empty list | ||
| 504 | - return None | ||
| 503 | + if not lst: # Empty list | ||
| 504 | + return | ||
| 505 | 505 | if branch_first: | |
| 506 | 506 | stack.extendleft(TraverseNT(depth, i, src_item) for i in lst) | |
| 507 | 507 | else: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -644,7 +644,7 @@ def _parse_progress_line(self, line: AnyStr) -> None: | |||
| 644 | 644 | self.line_dropped(line_str) | |
| 645 | 645 | # Note: Don't add this line to the other lines, as we have to silently | |
| 646 | 646 | # drop it. | |
| 647 | - return None | ||
| 647 | + return | ||
| 648 | 648 | # END handle op code | |
| 649 | 649 | ||
| 650 | 650 | # Figure out stage. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments