diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5bc2b29a..9f1295c5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.4 + rev: v1.5.5 hooks: - id: insert-license name: "Insert license header in Python source files" @@ -11,8 +11,8 @@ repos: - LICENSE_HEADER - --fuzzy-match-generates-todo - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.1.4 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.6.8 hooks: - id: ruff args: diff --git a/src/argilla_sdk/client.py b/src/argilla_sdk/client.py index 14b0e4c4..565be52a 100644 --- a/src/argilla_sdk/client.py +++ b/src/argilla_sdk/client.py @@ -122,13 +122,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 +148,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.""" @@ -207,13 +203,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] @@ -287,13 +281,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] diff --git a/src/argilla_sdk/workspaces/_resource.py b/src/argilla_sdk/workspaces/_resource.py index 1870bec7..4e528923 100644 --- a/src/argilla_sdk/workspaces/_resource.py +++ b/src/argilla_sdk/workspaces/_resource.py @@ -147,12 +147,10 @@ def __init__(self, workspace: "Workspace") -> None: self._workspace = workspace @overload - def add(self, user: "User") -> "User": - ... + def add(self, user: "User") -> "User": ... @overload - def add(self, user: str) -> "User": - ... + def add(self, user: str) -> "User": ... def add(self, user: Union["User", str]) -> "User": if isinstance(user, str): @@ -160,12 +158,10 @@ def add(self, user: Union["User", str]) -> "User": return user.add_to_workspace(workspace=self._workspace) @overload - def delete(self, user: "User") -> "User": - ... + def delete(self, user: "User") -> "User": ... @overload - def delete(self, user: str) -> "User": - ... + def delete(self, user: str) -> "User": ... def delete(self, user: Union["User", str]) -> "User": if isinstance(user, str):