Bug Fix: Improved NoReturn return call inference when the callable type evaluates to a partial Any or Unknown.
Bug Fix: Improved heuristics related to NoReturn detection when dealing with certain libraries that attempt to import another package within a try
statement but provide a "dummy implementation" in an except
clause. In this situation, we should use the declaration within the try
block and ignore the one in the except
clause.
Bug Fix: Fixed buggy assert in type evaluator that resulted in some crashes.
Behavior Change: Changed strictParameterNoneValue
to default to true rather than false. This reflects the updated guidance in PEP 484, which indicates that type checkers should not assume that a default argument of None
should imply an Optional
type.
Enhancement: If CLI version of pyright is run without providing arguments to certain commands, a failure is detected and reported. Thanks to Martin Fischer for this contribution.
Bug Fix: Fixed performance regression due to a recent change in the code flow engine when attempting to evaluate whether call is a NoReturn.
Enhancement: Added support for parameter type inference based on annotated base class method signatures and on default argument expressions.
Bug Fix: Fixed recent regression that caused unnecessary reanalysis when closing a file when using pyright as an LSP. The regression also sometimes resulted in unexpected errors from reanalyzed files including diagnostics about unaccessed variables.