Skip to content

Commit 316f066

Browse files
Improve docs and fix typos in docs
Signed-off-by: Jean-Christophe Morin <[email protected]>
1 parent 961d95e commit 316f066

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

docs/source/api.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ API
2222

2323
.. autoclass:: rez_pip.pip.DownloadedArtifact
2424
:members:
25+
26+
.. autoclass:: rez_pip.plugins.CleanupAction
27+
:members:

src/rez_pip/plugins/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ def __dir__() -> typing.List[str]:
3535
@dataclasses.dataclass(frozen=True)
3636
class CleanupAction:
3737
"""
38-
Cleanup hook action. If you want to to any cleanup from a cleanup hook
39-
you need ot return this.
38+
Cleanup hook action. If you want to do any cleanup from a cleanup hook
39+
you need to return this from the :func:`cleanup` hook.
4040
"""
4141

4242
#: Operation to perform.
4343
op: typing.Literal["remove"]
4444

45-
#: Path to on which to perform the operation.
45+
#: Path on which to perform the operation.
4646
path: str
4747

4848

@@ -101,8 +101,8 @@ def cleanup( # type: ignore[empty-body]
101101
self, dist: rez_pip.compat.importlib_metadata.Distribution, path: str
102102
) -> rez_pip.compat.Sequence[CleanupAction]:
103103
"""
104-
Cleanup a package post-installation. Do not do any files/directories from this hook.
105-
rez-pip will take care of deleting stuff for you.
104+
Cleanup a package post-installation. Do not delete any files/directories from this hook.
105+
Return the list of actions you want to perform and let rez-pip perform them.
106106
107107
:param dist: Python distribution.
108108
:param path: Root path of the rez variant.

0 commit comments

Comments
 (0)