Pyright

Latest version: v1.1.390

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

Scan your dependencies

Page 79 of 81

1.0.10

New Feature: Partial support for Python 3.7 data classes. Classes must subclass from `NamedTuple`. Doesn't yet handle `dataclass` class decorator. (Contribution from mhzed)
New Feature: Detect and flag attempt to instantiate abstract class or any class that derives from an abstract class that doesn't override all abstract methods.
New Feature: Pyright now retrieves the search paths from the default python interpreter or from the interpreter specified by the `python.pythonPath` setting in VS Code.
Fixed bug in file URI formatting that caused error messages on Windows.
Fixed exit code reporting in command-line tool.
Provided hover support in VS Code extension for symbols that have unknown types.

1.0.9

New Feature: Type analyzer now analyzes function decorators rather than ignoring type analysis for all calls to functions that have decorators. Proper analysis requires decorators to be annotated appropriately. A new config switch "reportUntypedFunctionDecorator" to identify decorators that lack the appropriate type annotations and therefore defeat type checking.
New Feature: Type analyzer is now smarter about analyzing while/else statements.
New Feature: Type analyzer handles `while True` and knows that it will not exit through the bottom of the loop.
New Feature: Pyright VS Code extension is now activated automatically if a pyrightconfig.json file is present in the workspace.
New Feature: Type analyzer now specializes the parameter and return types when analyzing a method on a specialized class.
New Feature: Type analyzer now takes into account parameters to the constructor (including the __init__ method) to infer the specialized type of an object.
New Feature: Variable ${workspaceFolder} is now expanded for paths that come from VS Code settings (like "python.venvPath").
New Feature: "Naked" raise is now flagged as an error if used outside of except clause.
New Feature: Added "--timing" switch to command-line tool to output detailed timing stats. By default, only the total time is reported.
New Feature: Command-line version can now be run with no parameters. It looks in the current working directory for a configuration file called "pyrightconfig.json".
Fixed exit code reporting in command-line version. It now properly exits with a code of zero if no errors or warnings are found.
Fixed bugs related to relative imports, especially with relative imports that consist of only "." or "..".
Fixed several bugs in type analysis engine related to tuples.
Removed "-P" switch from command-line tool. It was deprecated in the previous release.

1.0.8

New Feature: Added new configuration switches reportOptionalSubscript, reportOptionalMemberAccess and reportOptionalCall to control whether the type checker should report errors for these conditions.
New Feature: Added type analysis for lambdas.
New Feature: Added more comprehensive error reporting for type mismatch errors. These multi-line errors now include hierarchical information and detail about the detected type mismatch, allowing for easier diagnosis.
New Feature: The type checker now reports cases where a non-quoted type forward reference is used within a regular ".py" file. Such forward references are allowed in stub files.
Fixed several bugs in type matching logic related to function (Callable) types.
Fixed bug in handling of special-case types like Dict and FrozenSet when they are used in type annotations with no type arguments.
Added missing support for matrix multiply operator (``).

1.0.7

New Feature: Added support for PYTHONPATH environment variable for resolving imports.
New Feature: Added type checking for expressions that involve arithmetic, logical, and comparison operators.
Removed support for pythonPath config file entry and VS Code setting because it was confusing everyone.
Fixed type analyzer to not flag imported symbols as missing if they come from an external source file, even though pyright doesn't parse and analyze such files.

1.0.6

New feature: Progress reporting in VS Code status bar.
New feature: Return type validation is now disabled for methods with `abstractmethod` decorator.
New feature: Added JSON schema for pyrightconfig.json file so VS Code provides IntelliSense.
New feature: Added validation of type arguments for specialization of generic types. These are now validated against TypeVar constraints and bounds.
New feature: Added "ignore" settings which silences any errors or warnings generated for specified files or directories.
New feature: Added more validation of venvPath, pythonPath, typingsPath, typeshedPath and other settings to help diagnose configuration problems.
Fixed bug that caused venvPath and pythonPath not to be honored in config file.
Fixed regression that caused unknown symbols used in type annotations not to be flagged as errors.
Fixed bug in expression evaluator that resulted in false positive type errors.
Fixed bug in type constraint logic to invalidate previous constraints when a value is modified through an assignment.
Fixed handling of `__new__` magic method when it's called explicitly by name.
Fixed bug in type checking of functions that are passed as parameters.
Fixed logic that specializes generic types when no type parameters are specified (e.g. List or Callable).
Fixed bug that caused the analyzer to crash if a class derived from itself. This is now reported as an error case.
Made analyzer more resilient to internal errors. Rather than getting into an infinite loop of retries, it now flags a source file as complete and moves on.
Started to add tests for type analyzer.
Fixed crash that occurred if an input file or directory was invalid.
Further improved responsiveness of error reporting for files open within the editor.

1.0.5

Fixed several bugs in type constraint engine.
Improved performance of VS Code extension by increasing analysis batch time.
Added assignment type constraint for instance and class variables.
Fixed special-case type checking rules for int and float.
Fixed handling of type annotations that involve generic classes with no type variables (e.g. "list").

Page 79 of 81

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.