Skip to content

Commit

Permalink
docs: updated examples in function for retrieving user argilla-io#5011
Browse files Browse the repository at this point in the history
  • Loading branch information
datapumpernickel committed Jun 18, 2024
1 parent 08384a0 commit 9a158c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions argilla/src/argilla/client/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(
" advance in Argilla, unless you are creating a new one."
)
if id is not None:
error_msg += f" As the `id` argument is not None, you should use `User.from_id('{id}')` instead."
error_msg += f" As the `id` argument is not None, you should use `User.from_id(UUID('{id}'))` instead."
if name is not None:
error_msg += f" As the `name` argument is not None, you should use `User.from_name('{name}')` instead."
raise Exception(error_msg)
Expand Down Expand Up @@ -285,7 +285,8 @@ def from_id(cls, id: UUID) -> "User":
Examples:
>>> from argilla import rg
>>> user = rg.User.from_id("my-user")
>>> from uuid import UUID
>>> user = rg.User.from_id(UUID("my-user"))
"""
client = cls.__active_client()
try:
Expand Down

0 comments on commit 9a158c7

Please sign in to comment.