[🐛 BUG] Mismatch between bound variable type and Pylance #2430
Labels
🖰 GUI
Related to GUI
💥Malfunction
Addresses an identified problem.
🟨 Priority: Medium
Not blocking but should be addressed
What went wrong? 🤔
There is a type checking error from Pylance as I use binding:
Argument of type "Literal['{subcategories}']" cannot be assigned to parameter "lov" of type "dict[str, Any] | None" in function "init"
Type "Literal['{subcategories}']" is not assignable to type "dict[str, Any] | None"
"Literal['{subcategories}']" is not assignable to "dict[str, Any]"
"Literal['{subcategories}']" is not assignable to "None"
And even without binding something like:
Argument of type "list[str]" cannot be assigned to parameter "lov" of type "dict[str, Any] | None" in function "init"
Type "list[str]" is not assignable to type "dict[str, Any] | None"
"list[str]" is not assignable to "dict[str, Any]"
"list[str]" is not assignable to "None"
So, it only accepts an
lov
type of dict[str, Any] that does not even work!Additional Context
Acceptance Criteria
Code of Conduct
The text was updated successfully, but these errors were encountered: