From a62bfbce6e696fa1420f7d26d8dffd1923b58866 Mon Sep 17 00:00:00 2001 From: theodu Date: Thu, 28 Sep 2023 11:26:35 +0200 Subject: [PATCH] fix: show warnings in job and fix old warnings --- .github/workflows/ci.yml | 1 + src/kili/entrypoints/mutations/label/__init__.py | 2 +- src/kili/entrypoints/queries/plugins/__init__.py | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 894f37741..7dbab1bcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,6 +144,7 @@ jobs: - name: Look for Warnings run: | if grep -q "WARNING" doc-build.log; then + echo $(grep "WARNING" doc-build.log) echo "::error::Documentation build completed with warnings" exit 1 else diff --git a/src/kili/entrypoints/mutations/label/__init__.py b/src/kili/entrypoints/mutations/label/__init__.py index c511a60c1..67ad2ba0d 100644 --- a/src/kili/entrypoints/mutations/label/__init__.py +++ b/src/kili/entrypoints/mutations/label/__init__.py @@ -131,7 +131,7 @@ def append_to_labels( label_type: LabelType = "DEFAULT", project_id: Optional[str] = None, seconds_to_label: Optional[int] = 0, - ): + ) -> Dict[Literal["id"], str]: """!!! danger "[DEPRECATED]" append_to_labels method is deprecated. Please use append_labels instead. This new function allows to import several labels 10 times faster. diff --git a/src/kili/entrypoints/queries/plugins/__init__.py b/src/kili/entrypoints/queries/plugins/__init__.py index f4b537993..28b32ce46 100644 --- a/src/kili/entrypoints/queries/plugins/__init__.py +++ b/src/kili/entrypoints/queries/plugins/__init__.py @@ -2,7 +2,7 @@ import json from datetime import datetime -from typing import Optional +from typing import Dict, List, Optional from typeguard import typechecked @@ -95,7 +95,7 @@ def get_plugin_status( self, plugin_name: str, verbose: bool = True, - ): + ) -> str: """Update a plugin with new code. Args: @@ -116,7 +116,7 @@ def get_plugin_status( def list_plugins( self, fields: ListOrTuple[str] = ("name", "projectIds", "id", "createdAt", "updatedAt"), - ): + ) -> List[Dict]: # pylint: disable=line-too-long """List all plugins from your organization.