Pyright

Latest version: v1.1.390

Safety actively analyzes 685838 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 64 of 81

1.1.16

Bug Fix: Fixed bug that resulted in forward references to type aliases being reported as unbound.

Bug Fix: Fixed recent regression in completion provider that caused a crash.

1.1.15

Bug Fix: Fixed bug where function was not identified as a generator if its yield statements were unreachable.

Bug Fix: Fixed bug in handling of generic type parameters within a class declaration.

Bug Fix: Added support for None as a type parameter for Literal.

Enhancement: Added error for classes that attempt to derive from Generic more than once.

Enhancement: Added support for literal string value type completion suggestions for call arguments and assignment expressions.

1.1.14

Enhancement: Added synthesized overloaded "get" methods for TypedDict classes to support proper return types for each key value.

Enhancement: Added completion support for string literals used for TypedDict index expressions.

Enhancement: Added reportSelfClsParameterName setting and defaulted it to warning. This controls whether pyright emits an error or warning when a "self" or "cls" parameter is missing or is not named consistently with PEP 8.

Bug FIx: Fixed bug where callable class members were not being bound to instance as part of member access operator. As part of this fix, removed the FunctionTypeFlags.InstanceMethod flag, which is now implicit if SStaticMethod, ClassMethod or ConstructorMethod are not set.

Bug Fix: Fixed bug in f-string parsing that resulted in incorrect error reporting when expressions within f-string contained string literals with curly braces or with nested string literals (including nested f-strings).

1.1.13

Enhancement: Added special-cases support in type constraint logic for types Tuple[()] and Literal[False], both of which are always falsy.

Enhancement: Added error condition for wildcard import that's not at the module scope.

Enhancement: Added error condition to detect Protocol class passed as second argument to isinstance or issubclass.

Bug Fix: Fixed bug in decorator processing that caused cached_property to always evaluate the property type as Unknown.

Bug Fix: Improved wildcard import logic. It now attempts to honor __all__ assignment in target module. If __all__ is not defined, all symbols except for those starting with an underscore are imported.

Bug Fix: Added support for AsyncIterable as a declared return type for an async generator.

Bug Fix: "Tuple[()]" (the empty tuple) is now printed correctly (rather than "Tuple") in error messages.

1.1.12

Enhancement: Added code to detect the case where a subclass attempts to override a non-method (like a property) with a method. Also handle the case where a subclass overrides an overloaded method in the base class.

Enhancement: Added support for overloaded __get__ method.

Enhancement: Improved markdown formatting for completion provider output.

Enhancement: Added missing support for AsyncIterator return type annotations for async generator functions.

Bug Fix: Eliminated the hard-coded white list of exported symbols from builtins.pyi, which is no longer needed. This caused ModuleNotFoundError (introduced in Python 3.8) not to be exposed.

Bug Fix: Fixed text formatting issue in completion provider — missing colon between function name and type.

Bug Fix: Fixed several bugs in hover and completion providers related to modules and submodules.

Bug Fix: Fixed bug that caused VS Code settings (including python.pythonPath) to be ignored in some situations — most notably when a Python source file is opened outside of the context of a workspace.

1.1.11

Enhancement: Changed unknown (or unspecified) type arguments to be treated as "unknown" rather than "any" so they are reported as errors in strict mode. For example, `dict` is now treated as `Dict[Unknown, Unknown]`. This change uncovered a number of other latent bugs where TypeVar types were being specialized at inappropriate times.

Enhancement: Added ".venv" and ".git" directories to default exclude paths.

Bug Fix: Disabled file system watchers for source files if onlyOpenFiles is set to true (which is the default). This will avoid a bunch of problems that are caused by the file system watchers including high CPU utilization, memory usage, and files that can't be deleted.

Bug FIx: Fixed bug in reportIncompatibleMethodOverride logic. It wasn't properly generating an error when there was a parameter count mismatch.

Bug Fix: Fixed bug that caused incorrect error to be reported when a (non-literal) str type is used as an index for a TypedDict.

Page 64 of 81

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.