community: Add ruff rule PGH003 (#30812)

See https://docs.astral.sh/ruff/rules/blanket-type-ignore/

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
Christophe Bornet
2025-04-14 04:32:13 +02:00
committed by GitHub
parent f005988e31
commit ada740b5b9
148 changed files with 448 additions and 419 deletions

View File

@@ -142,7 +142,7 @@ class HuggingFaceHub(LLM):
if "error" in response:
raise ValueError(f"Error raised by inference API: {response['error']}")
response_key = VALID_TASKS_DICT[self.task] # type: ignore
response_key = VALID_TASKS_DICT[self.task] # type: ignore[index]
if isinstance(response, list):
text = response[0][response_key]
else: