github microsoft/pyright 1.1.125
Published 1.1.125

latest releases: 1.1.383, 1.1.382, 1.1.381...
3 years ago

Bug Fix: Disabled the "always False comparison" check for expressions like "sys.platform == 'win32'" because they can vary depending on environment.

Enhancement: Added error check for a class that attempts to derive from NamedTuple and other base classes. This is not supported and will generate runtime exceptions.

Enhancement: Improved type checking for generators. Fixed several false negatives and false positives relating to "yield from" expressions.

Enhancement: Changed special-case logic for self annotations used with __init__ methods to accommodate new usages in typeshed stubs.

Enhancement: Updated typeshed stubs to latest.

Bug Fix: Fixed bug in TypeVar constraint solver that resulted in a false positive when using the built-in "filter" method with the "os.path.exists" callback.

Bug Fix: Fixed bug where "comparison chaining" was not being appropriately applied to expressions that contained "is", "is not", "in" and "not in" operators in a chain (e.g. "1" in "1" == "1").

Enhancement: Added smarter handling of empty lists ([]) and dicts ({}). Previously, these were inferred to have types list[Unknown] and dict[Unknown, Unknown], respectively. They are now provided with a known type if the variable is assigned a known list or dict type along another code path.

Bug Fix (from pylance): Made hover text, signature help, and completion suggestions show function docstring using same code.

Bug Fix (from pylance): Fixed issue with partial stub files in cases where a stub file is found but no corresponding source (.py) file is found.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.