diff --git a/argilla-sdk/src/argilla_sdk/client.py b/argilla-sdk/src/argilla_sdk/client.py index 14b0e4c4f3..b2cdb3fa7f 100644 --- a/argilla-sdk/src/argilla_sdk/client.py +++ b/argilla-sdk/src/argilla_sdk/client.py @@ -28,7 +28,6 @@ from argilla_sdk import Dataset from argilla_sdk import User - from IPython.display import HTML __all__ = ["Argilla"] @@ -122,13 +121,11 @@ def __iter__(self): @overload @abstractmethod - def __getitem__(self, index: int) -> "User": - ... + def __getitem__(self, index: int) -> "User": ... @overload @abstractmethod - def __getitem__(self, index: slice) -> Sequence["User"]: - ... + def __getitem__(self, index: slice) -> Sequence["User"]: ... def __getitem__(self, index): model = self._api.list()[index] @@ -150,12 +147,10 @@ def add(self, user: "User") -> "User": return user.create() @overload - def list(self) -> List["User"]: - ... + def list(self) -> List["User"]: ... @overload - def list(self, workspace: "Workspace") -> List["User"]: - ... + def list(self, workspace: "Workspace") -> List["User"]: ... def list(self, workspace: Optional["Workspace"] = None) -> List["User"]: """List all users.""" @@ -170,7 +165,7 @@ def list(self, workspace: Optional["Workspace"] = None) -> List["User"]: # Private methods ############################ - def _repr_html_(self) -> "HTML": + def _repr_html_(self) -> str: return self._represent_as_html(resources=self.list()) def _from_model(self, model: UserModel) -> "User": @@ -207,13 +202,11 @@ def __iter__(self): @overload @abstractmethod - def __getitem__(self, index: int) -> "Workspace": - ... + def __getitem__(self, index: int) -> "Workspace": ... @overload @abstractmethod - def __getitem__(self, index: slice) -> Sequence["Workspace"]: - ... + def __getitem__(self, index: slice) -> Sequence["Workspace"]: ... def __getitem__(self, index) -> "Workspace": model = self._api.list()[index] @@ -249,7 +242,7 @@ def default(self) -> "Workspace": # Private methods ############################ - def _repr_html_(self) -> "HTML": + def _repr_html_(self) -> str: return self._represent_as_html(resources=self.list()) def _from_model(self, model: WorkspaceModel) -> "Workspace": @@ -287,13 +280,11 @@ def __iter__(self): @overload @abstractmethod - def __getitem__(self, index: int) -> "Dataset": - ... + def __getitem__(self, index: int) -> "Dataset": ... @overload @abstractmethod - def __getitem__(self, index: slice) -> Sequence["Dataset"]: - ... + def __getitem__(self, index: slice) -> Sequence["Dataset"]: ... def __getitem__(self, index) -> "Dataset": model = self._api.list()[index] @@ -324,7 +315,7 @@ def list(self) -> List["Dataset"]: # Private methods ############################ - def _repr_html_(self) -> "HTML": + def _repr_html_(self) -> str: return self._represent_as_html(resources=self.list()) def _from_model(self, model: DatasetModel) -> "Dataset":