chore: fix mypy failure (#5707)

* mypy

* add comment on type ignore
This commit is contained in:
ZanSara 2023-09-04 11:08:59 +01:00 committed by GitHub
parent 24b8cfb1c7
commit 7886284d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,7 +191,7 @@ class HFInferenceEndpointInvocationLayer(PromptModelInvocationLayer):
:param stream_handler: The handler to invoke on each token.
:param stop_words: The stop words to ignore.
"""
client = sseclient.SSEClient(response)
client = sseclient.SSEClient(response) # type: ignore # requests.Response behaves like a generator but the typing does not reflect it
tokens: List[str] = []
try:
for event in client.events():