Pyright

Latest version: v1.1.390

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

Scan your dependencies

Page 62 of 81

1.1.28

Enhancement: Handle the case where a function parameter with a type annotation that includes a generic (TypeVar) is assigned its value via a default argument rather than an explicit argument by the caller. The TypeVar should be matched using the default argument in this case.

Bug Fix: Fixed bug in parser where a single-element tuple atom used as a subscript index was handled incorrectly.

Enhancement: Added support for the multi-parameter form of the built-in "type" call.

Enhancement: When a class contains an `__init__` method whose input parameters are not annotated, generate a "pseudo-generic" class parameterized by the types of the init method's input parameters. This allows call-site specialization of the class, which provides better type checking and type completion suggestions.

1.1.27

Bug Fix: Fixed bug in type narrowing logic for isinstance and in the logic for detecting unnecessary isinstance and issubclass calls. In both cases, they were not properly handling the case where a class derived from an unknown class.

Enhancement: Implemented "Restart Server" command.

Enhancement: Improved performance of "find symbol" and "rename symbol" operations for symbols that are local and not visible outside of the current source file.

Enhancement: Added support for TypedDict classes that use other TypedDict classes in a nested manner.

Bug Fix: Fixed bug where a symbol declared within a class scope is used before it is assigned but a symbol with the same name exists in the containing scope. In this case, the symbol should not be flagged as "unbound".

1.1.26

Enhancement: If no execution environments are specified in the config file, the subdirectory "src" is automatically added as a default execution environment for purposes of resolving imports.

Bug Fix: Added correct method resolution ordering (MRO) as specified by Python 3 spec.

Bug Fix: Fixed bug in "organize imports" command where it was not properly handling wildcard imports.

Enhancement: Added error for inconsistent use of specs and tabs that leads to ambiguity in indentation.

Enhancement: Added error message for the case where a consistent method ordering can't be created.

Enhancement: Added pyright.verboseOutput VS Code setting to aid with diagnosing problems with import resolution.

Enhancement: Added support for overload functions that are async.

Enhancement: Improved appearance of documentation in hover text.

1.1.25

Bug Fix: Fixed "internal error" caused by assertion in type var matching logic.

Bug FIx: Fixed detection of abstract methods that are not overridden. Previous implementation made bad assumptions about overload ordering.

Bug Fix: Fixed a bug in the case where a type alias is used as a type argument for another (user-defined generic) type alias.

1.1.24

Enhancement: Added support for user-defined generic type aliases.

Bug Fix: Fixed the handling of bidirectional type inference for cases involving lists with a declared entry type.

Bug Fix: Fixed a condition where the literal portion of a type was improperly removed. This affected imported type aliases in some contexts.

1.1.23

Revert: Reverted default value of 'reportMissingTypeStubs' setting from 'warning' to 'none'.

Bug Fix: Fixed a bug in the f-string parsing code, which didn't correctly handle the case where the "!=" token was used in an f-string expression.

Bug Fix: Updated dataclass analysis logic so it can handle circular type references in dataclass definitions.

Bug Fix: Fixed a hole in protocol type checking. The type checker wasn't properly handling protocol classes that derived from other classes.

Bug Fix: Fixed bug in import resolver. It was incorrectly returning implicit imports for "import X" or "import X as Y" statements. It failed to flag some errors and presented incorrect type completion suggestions.

Enhancement: Improved signature help suggestions for data class constructors.

Enhancement: Improved parse recovery and error messages for syntax that was previously valid in Python 2 but was made obsolete in Python 3.

Page 62 of 81

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.