| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6626117 commit a957ae7
11 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,7 +59,7 @@ def partial_to_complete_sha_hex(self, partial_hexsha: str) -> bytes: | |||
| 59 | 59 | :raise gitdb.exc.BadObject: | |
| 60 | 60 | ||
| 61 | 61 | :note: | |
| 62 | - Currently we only raise :class:`~gitdb.exc.BadObject` as git does not | ||
| 62 | + Currently we only raise :exc:`~gitdb.exc.BadObject` as git does not | ||
| 63 | 63 | communicate ambiguous objects separately. | |
| 64 | 64 | """ | |
| 65 | 65 | try: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -550,8 +550,8 @@ def resolve_blobs(self, iter_blobs: Iterator[Blob]) -> "IndexFile": | |||
| 550 | 550 | This will effectively remove the index entries of the respective path at all | |
| 551 | 551 | non-null stages and add the given blob as new stage null blob. | |
| 552 | 552 | ||
| 553 | - For each path there may only be one blob, otherwise a :class:`ValueError` will | ||
| 554 | - be raised claiming the path is already at stage 0. | ||
| 553 | + For each path there may only be one blob, otherwise a :exc:`ValueError` will be | ||
| 554 | + raised claiming the path is already at stage 0. | ||
| 555 | 555 | ||
| 556 | 556 | :raise ValueError: | |
| 557 | 557 | If one of the blobs already existed at stage 0. | |
@@ -644,8 +644,8 @@ def _process_diff_args( | |||
| 644 | 644 | def _to_relative_path(self, path: PathLike) -> PathLike: | |
| 645 | 645 | """ | |
| 646 | 646 | :return: | |
| 647 | - Version of path relative to our git directory or raise :class:`ValueError` | ||
| 648 | - if it is not within our git directory. | ||
| 647 | + Version of path relative to our git directory or raise :exc:`ValueError` if | ||
| 648 | + it is not within our git directory. | ||
| 649 | 649 | ||
| 650 | 650 | :raise ValueError: | |
| 651 | 651 | """ | |
@@ -1215,7 +1215,7 @@ def checkout( | |||
| 1215 | 1215 | :param force: | |
| 1216 | 1216 | If ``True``, existing files will be overwritten even if they contain local | |
| 1217 | 1217 | modifications. | |
| 1218 | - If ``False``, these will trigger a :class:`~git.exc.CheckoutError`. | ||
| 1218 | + If ``False``, these will trigger a :exc:`~git.exc.CheckoutError`. | ||
| 1219 | 1219 | ||
| 1220 | 1220 | :param fprogress: | |
| 1221 | 1221 | See :meth:`IndexFile.add` for signature and explanation. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,7 +52,7 @@ def mkhead(repo: "Repo", path: PathLike) -> "Head": | |||
| 52 | 52 | ||
| 53 | 53 | def find_first_remote_branch(remotes: Sequence["Remote"], branch_name: str) -> "RemoteReference": | |
| 54 | 54 | """Find the remote branch matching the name of the given branch or raise | |
| 55 | - :class:`~git.exc.InvalidGitRepositoryError`.""" | ||
| 55 | + :exc:`~git.exc.InvalidGitRepositoryError`.""" | ||
| 56 | 56 | for remote in remotes: | |
| 57 | 57 | try: | |
| 58 | 58 | return remote.refs[branch_name] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -100,8 +100,8 @@ def add(self, sha: bytes, mode: int, name: str, force: bool = False) -> "TreeMod | |||
| 100 | 100 | """Add the given item to the tree. | |
| 101 | 101 | ||
| 102 | 102 | If an item with the given name already exists, nothing will be done, but a | |
| 103 | - :class:`ValueError` will be raised if the sha and mode of the existing item do | ||
| 104 | - not match the one you add, unless `force` is ``True``. | ||
| 103 | + :exc:`ValueError` will be raised if the sha and mode of the existing item do not | ||
| 104 | + match the one you add, unless `force` is ``True``. | ||
| 105 | 105 | ||
| 106 | 106 | :param sha: | |
| 107 | 107 | The 20 or 40 byte sha of the item to add. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -247,7 +247,7 @@ def checkout(self, force: bool = False, **kwargs: Any) -> Union["HEAD", "Head"]: | |||
| 247 | 247 | ||
| 248 | 248 | :param force: | |
| 249 | 249 | If ``True``, changes to the index and the working tree will be discarded. | |
| 250 | - If ``False``, :class:`~git.exc.GitCommandError` will be raised in that | ||
| 250 | + If ``False``, :exc:`~git.exc.GitCommandError` will be raised in that | ||
| 251 | 251 | situation. | |
| 252 | 252 | ||
| 253 | 253 | :param kwargs: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | def require_remote_ref_path(func: Callable[..., _T]) -> Callable[..., _T]: | |
| 24 | - """A decorator raising :class:`ValueError` if we are not a valid remote, based on the | ||
| 24 | + """A decorator raising :exc:`ValueError` if we are not a valid remote, based on the | ||
| 25 | 25 | path.""" | |
| 26 | 26 | ||
| 27 | 27 | def wrapper(self: T_References, *args: Any) -> _T: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -76,5 +76,5 @@ def delete(cls, repo: "Repo", *refs: "RemoteReference", **kwargs: Any) -> None: | |||
| 76 | 76 | ||
| 77 | 77 | @classmethod | |
| 78 | 78 | def create(cls, *args: Any, **kwargs: Any) -> NoReturn: | |
| 79 | - """Raise :class:`TypeError`. Defined so the ``create`` method is disabled.""" | ||
| 79 | + """Raise :exc:`TypeError`. Defined so the ``create`` method is disabled.""" | ||
| 80 | 80 | raise TypeError("Cannot explicitly create remote references") | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -738,7 +738,7 @@ def create( | |||
| 738 | 738 | ||
| 739 | 739 | :param force: | |
| 740 | 740 | If ``True``, force creation even if a symbolic reference with that name | |
| 741 | - already exists. Raise :class:`OSError` otherwise. | ||
| 741 | + already exists. Raise :exc:`OSError` otherwise. | ||
| 742 | 742 | ||
| 743 | 743 | :param logmsg: | |
| 744 | 744 | If not ``None``, the message to append to the reflog. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -153,8 +153,8 @@ def name_to_object(repo: "Repo", name: str, return_ref: bool = False) -> Union[A | |||
| 153 | 153 | ||
| 154 | 154 | :param return_ref: | |
| 155 | 155 | If ``True``, and name specifies a reference, we will return the reference | |
| 156 | - instead of the object. Otherwise it will raise :class:`~gitdb.exc.BadObject` or | ||
| 157 | - :class:`~gitdb.exc.BadName`. | ||
| 156 | + instead of the object. Otherwise it will raise :exc:`~gitdb.exc.BadObject` or | ||
| 157 | + :exc:`~gitdb.exc.BadName`. | ||
| 158 | 158 | """ | |
| 159 | 159 | hexsha: Union[None, str, bytes] = None | |
| 160 | 160 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -190,7 +190,7 @@ def assert_never(inp: NoReturn, raise_error: bool = True, exc: Union[Exception, | |||
| 190 | 190 | mismatch and cause a mypy error. | |
| 191 | 191 | ||
| 192 | 192 | :param raise_error: | |
| 193 | - If ``True``, will also raise :class:`ValueError` with a general "unhandled | ||
| 193 | + If ``True``, will also raise :exc:`ValueError` with a general "unhandled | ||
| 194 | 194 | literal" message, or the exception object passed as `exc`. | |
| 195 | 195 | ||
| 196 | 196 | :param exc: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments