mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-26 22:05:29 +00:00
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:
committed by
GitHub
parent
f005988e31
commit
ada740b5b9
@@ -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:
|
||||
|
Reference in New Issue
Block a user