Pyright: Argument of type "str | Unknown | bool" cannot be assigned to parameter "max_allowed_power" of type "int" in function "__init__"
Type "str | Unknown | bool" cannot be assigned to type "int"
str" is incompatible with "int" [reportGeneralTypeIssues]
Hello,
I am trying to use
cast
to parse a parameter and use it as an argument for a function that uses type hints.But the LSP returns the following error:
Am I doing something wrong? Thanks!