You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We default the field with a value of None, and lazily initialize it later on if the user did not provide their own, non-None, value.
Pyright's latest release seems to have patched this out.
Now we get many of these:
/Users/collindutter/Documents/griptape/griptape/docs/examples/src/talk_to_a_webpage_1.py:41:9 - error: Argument of type "None" cannot be assigned to parameter "prompt_driver" of type "BasePromptDriver" in function "__init__"
"None" is not assignable to "BasePromptDriver" (reportArgumentType)
Presumably the change came from:
Fixed bug that leads to inconsistent behavior in certain cases involving the evaluation of a call whose target signature involves a parameter with a default argument value, notably where the type of the default value isn't assignable to the declared type of its parameter.
The text was updated successfully, but these errors were encountered:
Diagnostics:
1. Argument of type "None" cannot be assigned to parameter "out" of type "ndarray[Unknown, Unknown]" in function "evaluate"
"None" is not assignable to "ndarray[Unknown, Unknown]" [reportArgumentType]
Diagnostics:
1. Argument of type "None" cannot be assigned to parameter "truncation" of type "bool | str | TruncationStrategy" in function "encode"
Type "None" is not assignable to type "bool | str | TruncationStrategy"
"None" is not assignable to "bool"
"None" is not assignable to "str"
"None" is not assignable to "TruncationStrategy" [reportArgumentType]
We make frequent use of this pattern to lazily initialize values:
griptape/griptape/drivers/prompt/openai_chat_prompt_driver.py
Lines 107 to 115 in f5503bd
griptape/griptape/tokenizers/base_tokenizer.py
Lines 18 to 27 in f5503bd
We default the field with a value of
None
, and lazily initialize it later on if the user did not provide their own, non-None
, value.Pyright's latest release seems to have patched this out.
Now we get many of these:
Presumably the change came from:
The text was updated successfully, but these errors were encountered: