Pyright

Latest version: v1.1.390

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

Scan your dependencies

Page 67 of 81

1.0.83

Enhancement: A rewritten implementation of the code flow and type constraint engine provides better handling of complex code flow like nested loops, try/except/finally statements, etc.

Enhancement: In VS Code extension, changed the logic for how to handle opened files that don't fall within any workspace. Previously, all such files were analyzed in a default workspace using default settings. The new logic uses the current workspace if there is only one. The "default" workspace fallback is still used for multi-root workspaces.

Bug Fix: Fixed bugs in logic that determines when to allow importing a non-stub from a stub file. It's not allowed for third-party files.

Bug Fix: Changed import logic to search for imported symbols in the target module before looking for submodules of the same name.

Bug Fix: Unreachable code is displayed even for files where errors or warnings are suppressed.

Bug Fix: Fixed TypeVar matching logic to avoid adding widened types if the TypeVar was already matched against subclasses of the type that is being added.

Bug Fix: Union types that include Literal[True] and Literal[False] are now collapsed into a 'bool' type.

1.0.82

Bug Fix: Fixed type completions for TypedDict classes when TypedDict is imported from typings (versus typing_extensions).

Bug Fix: Fixed bug that affected proper type evaluation for CTypes like c_uint64.

Bug Fix: Changed server to create <default> service on demand, when a file is opened that doesn't match any existing workspace.

Bug Fix: Fixed bug that caused list[x] and List[x] not to be combined into the same union type.

Bug Fix: Added support for proper type inference for assignments that target lists (e.g. `[a, b] = [1, 2]`).

Enhancement: Added missing methods and attribute to memoryview class in builtins.pyi.

1.0.81

Enhancement: Command-line version now exits with a new exit code (3) if the pyrightconfig.json is malformed or cannot be read. Previously, it proceeded to perform the analysis with default settings.

Enhancement: Added support for interleaved for and if clauses within a list comprehension statement. Previously, the analyzer assumed that there would be only one if clause and it would be after all for clauses.

Enhancement: the built-in function issubclass is now supported by the analyzer in the same way as isinstance. It can be used as a type constraint in conditional code flow statements (if, while, etc.), and the reportUnnecessaryIsInstance setting applies to it.

Enhancement: Added support for the abc.abstractproperty function decorator.

Bug Fix: Fixed a reported bug relating to the handling of the overload function decorator. This was due to a recent regression.

1.0.80

Enhancement: Added code to interpret the python.path VS Code setting in the same manner as the Python VS Code extension. In particular, it now handles the special-case value of "python" to mean "use the default python interpreter" rather than treating it as a relative path.

Enhancement: Added special-case handling of `__import__` built-in call so it always returns `Any` type.

Bug Fix: Fixed bug in code that determines whether code is reachable.

Bug Fix: Fixed static expression evaluation for expressions that involve python platform when no platform is specified.

Bug Fix: Fixed bug in alias resolution logic that caused the definition provider not to take the user to the right location in cases where there were multiple alias hops.

Bug Fix: Changed implicit module symbol `__path__` to be properly typed as `Iterable[str]` rather than str.

1.0.79

Bug Fix: Fixed regression introduced in 1.0.77 that caused imports of third-party libraries to generate "not a known member of module" error messages.

This version includes a big change in the way pyright tracks variable declarations. This change should not be visible to users. It was done in preparation for an upcoming change in the analysis engine.

1.0.77

New Feature: Signature help provider now extracts parameter-specific comments and presents them in the help text when typing function arguments.

Enhancement: Added knowledge of `__doc__` symbol to all modules.

Bug Fix: Fixed crash that resulted when launching the production VS Code extension in debug mode.

Bug Fix: Fixed recent regression that broke type completions within import statements.

Bug Fix: Fixed issue that caused analysis to fail after repeated edits while in "watch" mode.

This version includes a big change in the way pyright processes import statements. This change should not be visible to users. It was done in preparation for an upcoming change in the type analysis engine.

Page 67 of 81

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.