Pyright

Latest version: v1.1.390

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

Scan your dependencies

Page 76 of 81

1.0.28

New Feature: Added new config settings "strictListInference" and "strictDictionaryInference".
Bug Fix: Improved error reporting for union type mismatches.
Bug Fix 124: Fixed path/URI parsing logic for Windows that resulted in import failures.
Bug Fix: Fixed bug in type analyzer where it wasn't doing proper type variable matching in some cases.
Bug Fix: Exit code of 0 is reported if only errors (not warnings) are reported. Thanks to higosh for the contribution!

1.0.27

New Feature: In the VS Code extension, added automatic detection and reporting of accessed local variables, parameters, imports, private methods and private class variables. They appear as "gray" in the editor.
New Feature: Entries defined in NamedTuple or namedtuple now work with the "show definition" feature in VS Code.
New Feature: Added "reportConstantRedefinition" feature, which reports any attempt to redefine a variable that is named in all-caps.
Bug Fix: Fixed code flow analysis bug relating to try/except/else statements.
Bug Fix 123: breakpoint function was being incorrectly excluded from the builtins namespace.

1.0.26

New Feature: Added "reportIncompatibleMethodOverride" config switch for reporting method overrides that are incompatible with the base class.
New Feature: Changed VS Code extension to use the root execution path of the project as the implicit include if no other include file specs are provided.
New Feature: Added support for the TYPE_CHECKING variable defined in typing.pyi.
New Feature: Added "--version" switch to command line - contribution by Oleg Butuzov.
Bug Fix 120: An import within a conditional statement was being reported as an "unbound" variable.
Bug Fix: Fixed issue where strict type mode was resulting in an indication that a local variable was unknown in some loops.
Bug Fix: When filling in missing type arguments for a generic class, use the specialized version of the TypeVar rather than Any.
Bug Fix: A "break" statement within a conditional statement was not being propagated up to the loop scope, resulting in incorrect code flow analysis.
Bug Fix: Improved type combining logic - literals are now elided when combined with non-literal of the same type.

1.0.25

New Feature: Extended type constraint logic for isinstance calls that pass a tuple of types for the second parameter.
New Feature: Improved definition provider ("show definitions") to handle multiple declarations. This occurs when overrides are used and when a member is declared in different places for types in a union.
New Feature: Types used for TypeVar bound and constraint types are now validated to ensure that they are not generic (i.e. use other TypeVars).
New Feature: Implemented proper type inference for dictionary literals that use list comprehensions.
New Feature: Annotated types for function parameters are now enforced, so an attempt to reassign the parameter will generate an error if the assigned value doesn't match the annotated type.
Bug Fix: Fixed reported bug with specialized type aliases.
Bug Fix: Type constraint logic was not properly handling the case where an assignment targeted a property.
Bug Fix: Imports of the form "from . import X" are now properly checked, and an error is reported if X doesn't exist.

1.0.24

New Feature: Type checker now honors type annotations on `*args` and `**kwargs` function parameters.
New Feature: Changed the way assignments are handled when the target of the assignment has a declared type. The type checker now uses the source (RHS) of the assignment to constrain the declared type if it is a union.
Bug Fix: Unbound or potentially-unbound variables are once again flagged as such.
Bug Fix: Fixed type inference for instantiation of generic class based on arguments passed to its constructor or init routine.
Bug Fix: Fixed several bugs relating to list comprehension type analysis.
Bug Fix: Fixed code flow analysis logic for for/else statements.
Bug Fix: Arguments with a literal type need to be "genericized" before performing type var matching on generic functions.
Bug Fix: Literal types with a value of 0 or empty string were not being printed as a literal in error messages.
Bug Fix: Fixed another bug in the datetime.pyi typeshed stub file relating to the `datetime.combine` method.
Bug Fix: Fixed a bug in the builtins.pyi typeshed stub file in the `tuple.__add__` method. It required that the parameter be of the same tuple type.

1.0.23

New Feature: Added support for Literal type in typing_extensions.
New Feature: Added typing_extensions.pyi fallback type stub file.
New Feature: Types for arg and kwarg parameters are now correctly inferred to be of type List[X] and Dict[str, X] where X is either specified by the type annotation or assumed to be Unknown.
New Feature: Added type constraint logic for expressions of the form "type(X) is Y" and "type(X) is not Y".
New Feature: Added validation for ClassVar parameters to ensure that it doesn't contain any type variables.
Bug Fix: Fixed bug in "datetime.combine" method in datetime.pyi typeshed type stub.
Bug Fix: Type checker was not properly handling assignments where the LHS was a tuple and the RHS was an utterable type.
Improved responsiveness of VS Code extension.

Page 76 of 81

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.