Skip to content

Commit

Permalink
Improve docs and fix typos in docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <[email protected]>
  • Loading branch information
JeanChristopheMorinPerso committed Jan 12, 2025
1 parent 961d95e commit 316f066
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ API

.. autoclass:: rez_pip.pip.DownloadedArtifact
:members:

.. autoclass:: rez_pip.plugins.CleanupAction
:members:
10 changes: 5 additions & 5 deletions src/rez_pip/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ def __dir__() -> typing.List[str]:
@dataclasses.dataclass(frozen=True)
class CleanupAction:
"""
Cleanup hook action. If you want to to any cleanup from a cleanup hook
you need ot return this.
Cleanup hook action. If you want to do any cleanup from a cleanup hook
you need to return this from the :func:`cleanup` hook.
"""

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

#: Path to on which to perform the operation.
#: Path on which to perform the operation.
path: str


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

0 comments on commit 316f066

Please sign in to comment.