| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -495,9 +495,8 @@ def refresh(cls, path: Union[None, PathLike] = None) -> bool: | |||
| 495 | 495 | if mode in quiet: | |
| 496 | 496 | pass | |
| 497 | 497 | elif mode in warn or mode in error: | |
| 498 | - err = ( | ||
| 499 | - dedent( | ||
| 500 | - """\ | ||
| 498 | + err = dedent( | ||
| 499 | + """\ | ||
| 501 | 500 | %s | |
| 502 | 501 | All git commands will error until this is rectified. | |
| 503 | 502 | ||
@@ -510,40 +509,35 @@ def refresh(cls, path: Union[None, PathLike] = None) -> bool: | |||
| 510 | 509 | Example: | |
| 511 | 510 | export %s=%s | |
| 512 | 511 | """ | |
| 513 | - ) | ||
| 514 | - % ( | ||
| 515 | - err, | ||
| 516 | - cls._refresh_env_var, | ||
| 517 | - "|".join(quiet), | ||
| 518 | - "|".join(warn), | ||
| 519 | - "|".join(error), | ||
| 520 | - cls._refresh_env_var, | ||
| 521 | - quiet[0], | ||
| 522 | - ) | ||
| 512 | + ) % ( | ||
| 513 | + err, | ||
| 514 | + cls._refresh_env_var, | ||
| 515 | + "|".join(quiet), | ||
| 516 | + "|".join(warn), | ||
| 517 | + "|".join(error), | ||
| 518 | + cls._refresh_env_var, | ||
| 519 | + quiet[0], | ||
| 523 | 520 | ) | |
| 524 | 521 | ||
| 525 | 522 | if mode in warn: | |
| 526 | 523 | _logger.critical(err) | |
| 527 | 524 | else: | |
| 528 | 525 | raise ImportError(err) | |
| 529 | 526 | else: | |
| 530 | - err = ( | ||
| 531 | - dedent( | ||
| 532 | - """\ | ||
| 527 | + err = dedent( | ||
| 528 | + """\ | ||
| 533 | 529 | %s environment variable has been set but it has been set with an invalid value. | |
| 534 | 530 | ||
| 535 | 531 | Use only the following values: | |
| 536 | 532 | - %s: for no message or exception | |
| 537 | 533 | - %s: for a warning message (logging level CRITICAL, displayed by default) | |
| 538 | 534 | - %s: for a raised exception | |
| 539 | 535 | """ | |
| 540 | - ) | ||
| 541 | - % ( | ||
| 542 | - cls._refresh_env_var, | ||
| 543 | - "|".join(quiet), | ||
| 544 | - "|".join(warn), | ||
| 545 | - "|".join(error), | ||
| 546 | - ) | ||
| 536 | + ) % ( | ||
| 537 | + cls._refresh_env_var, | ||
| 538 | + "|".join(quiet), | ||
| 539 | + "|".join(warn), | ||
| 540 | + "|".join(error), | ||
| 547 | 541 | ) | |
| 548 | 542 | raise ImportError(err) | |
| 549 | 543 | ||
@@ -565,13 +559,11 @@ def is_cygwin(cls) -> bool: | |||
| 565 | 559 | ||
| 566 | 560 | @overload | |
| 567 | 561 | @classmethod | |
| 568 | - def polish_url(cls, url: str, is_cygwin: Literal[False] = ...) -> str: | ||
| 569 | - ... | ||
| 562 | + def polish_url(cls, url: str, is_cygwin: Literal[False] = ...) -> str: ... | ||
| 570 | 563 | ||
| 571 | 564 | @overload | |
| 572 | 565 | @classmethod | |
| 573 | - def polish_url(cls, url: str, is_cygwin: Union[None, bool] = None) -> str: | ||
| 574 | - ... | ||
| 566 | + def polish_url(cls, url: str, is_cygwin: Union[None, bool] = None) -> str: ... | ||
| 575 | 567 | ||
| 576 | 568 | @classmethod | |
| 577 | 569 | def polish_url(cls, url: str, is_cygwin: Union[None, bool] = None) -> PathLike: | |
@@ -932,8 +924,7 @@ def execute( | |||
| 932 | 924 | command: Union[str, Sequence[Any]], | |
| 933 | 925 | *, | |
| 934 | 926 | as_process: Literal[True], | |
| 935 | - ) -> "AutoInterrupt": | ||
| 936 | - ... | ||
| 927 | + ) -> "AutoInterrupt": ... | ||
| 937 | 928 | ||
| 938 | 929 | @overload | |
| 939 | 930 | def execute( | |
@@ -942,8 +933,7 @@ def execute( | |||
| 942 | 933 | *, | |
| 943 | 934 | as_process: Literal[False] = False, | |
| 944 | 935 | stdout_as_string: Literal[True], | |
| 945 | - ) -> Union[str, Tuple[int, str, str]]: | ||
| 946 | - ... | ||
| 936 | + ) -> Union[str, Tuple[int, str, str]]: ... | ||
| 947 | 937 | ||
| 948 | 938 | @overload | |
| 949 | 939 | def execute( | |
@@ -952,8 +942,7 @@ def execute( | |||
| 952 | 942 | *, | |
| 953 | 943 | as_process: Literal[False] = False, | |
| 954 | 944 | stdout_as_string: Literal[False] = False, | |
| 955 | - ) -> Union[bytes, Tuple[int, bytes, str]]: | ||
| 956 | - ... | ||
| 945 | + ) -> Union[bytes, Tuple[int, bytes, str]]: ... | ||
| 957 | 946 | ||
| 958 | 947 | @overload | |
| 959 | 948 | def execute( | |
@@ -963,8 +952,7 @@ def execute( | |||
| 963 | 952 | with_extended_output: Literal[False], | |
| 964 | 953 | as_process: Literal[False], | |
| 965 | 954 | stdout_as_string: Literal[True], | |
| 966 | - ) -> str: | ||
| 967 | - ... | ||
| 955 | + ) -> str: ... | ||
| 968 | 956 | ||
| 969 | 957 | @overload | |
| 970 | 958 | def execute( | |
@@ -974,8 +962,7 @@ def execute( | |||
| 974 | 962 | with_extended_output: Literal[False], | |
| 975 | 963 | as_process: Literal[False], | |
| 976 | 964 | stdout_as_string: Literal[False], | |
| 977 | - ) -> bytes: | ||
| 978 | - ... | ||
| 965 | + ) -> bytes: ... | ||
| 979 | 966 | ||
| 980 | 967 | def execute( | |
| 981 | 968 | self, | |
@@ -1387,8 +1374,9 @@ def __call__(self, **kwargs: Any) -> "Git": | |||
| 1387 | 1374 | return self | |
| 1388 | 1375 | ||
| 1389 | 1376 | @overload | |
| 1390 | - def _call_process(self, method: str, *args: None, **kwargs: None) -> str: | ||
| 1391 | - ... # If no args were given, execute the call with all defaults. | ||
| 1377 | + def _call_process( | ||
| 1378 | + self, method: str, *args: None, **kwargs: None | ||
| 1379 | + ) -> str: ... # If no args were given, execute the call with all defaults. | ||
| 1392 | 1380 | ||
| 1393 | 1381 | @overload | |
| 1394 | 1382 | def _call_process( | |
@@ -1398,14 +1386,12 @@ def _call_process( | |||
| 1398 | 1386 | as_process: Literal[True], | |
| 1399 | 1387 | *args: Any, | |
| 1400 | 1388 | **kwargs: Any, | |
| 1401 | - ) -> "Git.AutoInterrupt": | ||
| 1402 | - ... | ||
| 1389 | + ) -> "Git.AutoInterrupt": ... | ||
| 1403 | 1390 | ||
| 1404 | 1391 | @overload | |
| 1405 | 1392 | def _call_process( | |
| 1406 | 1393 | self, method: str, *args: Any, **kwargs: Any | |
| 1407 | - ) -> Union[str, bytes, Tuple[int, Union[str, bytes], str], "Git.AutoInterrupt"]: | ||
| 1408 | - ... | ||
| 1394 | + ) -> Union[str, bytes, Tuple[int, Union[str, bytes], str], "Git.AutoInterrupt"]: ... | ||
| 1409 | 1395 | ||
| 1410 | 1396 | def _call_process( | |
| 1411 | 1397 | self, method: str, *args: Any, **kwargs: Any | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -69,13 +69,11 @@ | |||
| 69 | 69 | ||
| 70 | 70 | ||
| 71 | 71 | @overload | |
| 72 | - def safe_decode(s: None) -> None: | ||
| 73 | - ... | ||
| 72 | + def safe_decode(s: None) -> None: ... | ||
| 74 | 73 | ||
| 75 | 74 | ||
| 76 | 75 | @overload | |
| 77 | - def safe_decode(s: AnyStr) -> str: | ||
| 78 | - ... | ||
| 76 | + def safe_decode(s: AnyStr) -> str: ... | ||
| 79 | 77 | ||
| 80 | 78 | ||
| 81 | 79 | def safe_decode(s: Union[AnyStr, None]) -> Optional[str]: | |
@@ -91,13 +89,11 @@ def safe_decode(s: Union[AnyStr, None]) -> Optional[str]: | |||
| 91 | 89 | ||
| 92 | 90 | ||
| 93 | 91 | @overload | |
| 94 | - def safe_encode(s: None) -> None: | ||
| 95 | - ... | ||
| 92 | + def safe_encode(s: None) -> None: ... | ||
| 96 | 93 | ||
| 97 | 94 | ||
| 98 | 95 | @overload | |
| 99 | - def safe_encode(s: AnyStr) -> bytes: | ||
| 100 | - ... | ||
| 96 | + def safe_encode(s: AnyStr) -> bytes: ... | ||
| 101 | 97 | ||
| 102 | 98 | ||
| 103 | 99 | def safe_encode(s: Optional[AnyStr]) -> Optional[bytes]: | |
@@ -113,13 +109,11 @@ def safe_encode(s: Optional[AnyStr]) -> Optional[bytes]: | |||
| 113 | 109 | ||
| 114 | 110 | ||
| 115 | 111 | @overload | |
| 116 | - def win_encode(s: None) -> None: | ||
| 117 | - ... | ||
| 112 | + def win_encode(s: None) -> None: ... | ||
| 118 | 113 | ||
| 119 | 114 | ||
| 120 | 115 | @overload | |
| 121 | - def win_encode(s: AnyStr) -> bytes: | ||
| 122 | - ... | ||
| 116 | + def win_encode(s: AnyStr) -> bytes: ... | ||
| 123 | 117 | ||
| 124 | 118 | ||
| 125 | 119 | def win_encode(s: Optional[AnyStr]) -> Optional[bytes]: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -286,9 +286,9 @@ def read_cache( | |||
| 286 | 286 | # 4 bytes length of chunk | |
| 287 | 287 | # Repeated 0 - N times | |
| 288 | 288 | extension_data = stream.read(~0) | |
| 289 | - assert ( | ||
| 290 | - len(extension_data) > 19 | ||
| 291 | - ), "Index Footer was not at least a sha on content as it was only %i bytes in size" % len(extension_data) | ||
| 289 | + assert len(extension_data) > 19, ( | ||
| 290 | + "Index Footer was not at least a sha on content as it was only %i bytes in size" % len(extension_data) | ||
| 291 | + ) | ||
| 292 | 292 | ||
| 293 | 293 | content_sha = extension_data[-20:] | |
| 294 | 294 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -152,13 +152,11 @@ def _find_by_name(tree_data: MutableSequence[EntryTupOrNone], name: str, is_dir: | |||
| 152 | 152 | ||
| 153 | 153 | ||
| 154 | 154 | @overload | |
| 155 | - def _to_full_path(item: None, path_prefix: str) -> None: | ||
| 156 | - ... | ||
| 155 | + def _to_full_path(item: None, path_prefix: str) -> None: ... | ||
| 157 | 156 | ||
| 158 | 157 | ||
| 159 | 158 | @overload | |
| 160 | - def _to_full_path(item: EntryTup, path_prefix: str) -> EntryTup: | ||
| 161 | - ... | ||
| 159 | + def _to_full_path(item: EntryTup, path_prefix: str) -> EntryTup: ... | ||
| 162 | 160 | ||
| 163 | 161 | ||
| 164 | 162 | def _to_full_path(item: EntryTupOrNone, path_prefix: str) -> EntryTupOrNone: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -188,7 +188,7 @@ class Tree(IndexObject, git_diff.Diffable, util.Traversable, util.Serializable): | |||
| 188 | 188 | _map_id_to_type: Dict[int, Type[IndexObjUnion]] = { | |
| 189 | 189 | commit_id: Submodule, | |
| 190 | 190 | blob_id: Blob, | |
| 191 | - symlink_id: Blob | ||
| 191 | + symlink_id: Blob, | ||
| 192 | 192 | # Tree ID added once Tree is defined. | |
| 193 | 193 | } | |
| 194 | 194 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -620,8 +620,7 @@ def list_traverse(self: T_TIobj, *args: Any, **kwargs: Any) -> IterableList[T_TI | |||
| 620 | 620 | return super()._list_traverse(*args, **kwargs) | |
| 621 | 621 | ||
| 622 | 622 | @overload # type: ignore | |
| 623 | - def traverse(self: T_TIobj) -> Iterator[T_TIobj]: | ||
| 624 | - ... | ||
| 623 | + def traverse(self: T_TIobj) -> Iterator[T_TIobj]: ... | ||
| 625 | 624 | ||
| 626 | 625 | @overload | |
| 627 | 626 | def traverse( | |
@@ -633,8 +632,7 @@ def traverse( | |||
| 633 | 632 | visit_once: bool, | |
| 634 | 633 | ignore_self: Literal[True], | |
| 635 | 634 | as_edge: Literal[False], | |
| 636 | - ) -> Iterator[T_TIobj]: | ||
| 637 | - ... | ||
| 635 | + ) -> Iterator[T_TIobj]: ... | ||
| 638 | 636 | ||
| 639 | 637 | @overload | |
| 640 | 638 | def traverse( | |
@@ -646,8 +644,7 @@ def traverse( | |||
| 646 | 644 | visit_once: bool, | |
| 647 | 645 | ignore_self: Literal[False], | |
| 648 | 646 | as_edge: Literal[True], | |
| 649 | - ) -> Iterator[Tuple[Union[T_TIobj, None], T_TIobj]]: | ||
| 650 | - ... | ||
| 647 | + ) -> Iterator[Tuple[Union[T_TIobj, None], T_TIobj]]: ... | ||
| 651 | 648 | ||
| 652 | 649 | @overload | |
| 653 | 650 | def traverse( | |
@@ -659,8 +656,7 @@ def traverse( | |||
| 659 | 656 | visit_once: bool, | |
| 660 | 657 | ignore_self: Literal[True], | |
| 661 | 658 | as_edge: Literal[True], | |
| 662 | - ) -> Iterator[Tuple[T_TIobj, T_TIobj]]: | ||
| 663 | - ... | ||
| 659 | + ) -> Iterator[Tuple[T_TIobj, T_TIobj]]: ... | ||
| 664 | 660 | ||
| 665 | 661 | def traverse( | |
| 666 | 662 | self: T_TIobj, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,22 +93,19 @@ def add_progress( | |||
| 93 | 93 | ||
| 94 | 94 | ||
| 95 | 95 | @overload | |
| 96 | - def to_progress_instance(progress: None) -> RemoteProgress: | ||
| 97 | - ... | ||
| 96 | + def to_progress_instance(progress: None) -> RemoteProgress: ... | ||
| 98 | 97 | ||
| 99 | 98 | ||
| 100 | 99 | @overload | |
| 101 | - def to_progress_instance(progress: Callable[..., Any]) -> CallableRemoteProgress: | ||
| 102 | - ... | ||
| 100 | + def to_progress_instance(progress: Callable[..., Any]) -> CallableRemoteProgress: ... | ||
| 103 | 101 | ||
| 104 | 102 | ||
| 105 | 103 | @overload | |
| 106 | - def to_progress_instance(progress: RemoteProgress) -> RemoteProgress: | ||
| 107 | - ... | ||
| 104 | + def to_progress_instance(progress: RemoteProgress) -> RemoteProgress: ... | ||
| 108 | 105 | ||
| 109 | 106 | ||
| 110 | 107 | def to_progress_instance( | |
| 111 | - progress: Union[Callable[..., Any], RemoteProgress, None] | ||
| 108 | + progress: Union[Callable[..., Any], RemoteProgress, None], | ||
| 112 | 109 | ) -> Union[RemoteProgress, CallableRemoteProgress]: | |
| 113 | 110 | """Given the `progress` return a suitable object derived from | |
| 114 | 111 | :class:`~git.util.RemoteProgress`.""" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -441,13 +441,11 @@ def decygpath(path: PathLike) -> str: | |||
| 441 | 441 | ||
| 442 | 442 | ||
| 443 | 443 | @overload | |
| 444 | - def is_cygwin_git(git_executable: None) -> Literal[False]: | ||
| 445 | - ... | ||
| 444 | + def is_cygwin_git(git_executable: None) -> Literal[False]: ... | ||
| 446 | 445 | ||
| 447 | 446 | ||
| 448 | 447 | @overload | |
| 449 | - def is_cygwin_git(git_executable: PathLike) -> bool: | ||
| 450 | - ... | ||
| 448 | + def is_cygwin_git(git_executable: PathLike) -> bool: ... | ||
| 451 | 449 | ||
| 452 | 450 | ||
| 453 | 451 | def is_cygwin_git(git_executable: Union[None, PathLike]) -> bool: | |
@@ -494,8 +492,7 @@ def finalize_process(proc: Union[subprocess.Popen, "Git.AutoInterrupt"], **kwarg | |||
| 494 | 492 | ||
| 495 | 493 | ||
| 496 | 494 | @overload | |
| 497 | - def expand_path(p: None, expand_vars: bool = ...) -> None: | ||
| 498 | - ... | ||
| 495 | + def expand_path(p: None, expand_vars: bool = ...) -> None: ... | ||
| 499 | 496 | ||
| 500 | 497 | ||
| 501 | 498 | @overload | |
| Back | FazBrowse Home | New Git URL |
0 commit comments