Pyright

Latest version: v1.1.390

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

Scan your dependencies

Page 77 of 81

1.0.22

Bug Fix: Fixed bad regression introduced in 1.0.20 where imported modules that are imported with the `import xyz` statement (as opposed to the `from xyz import abc` form) are reported as 'unbound'. This occurs only if there is no type stub file found for that import.

1.0.21

New Feature: Added "reportUntypedNamedTuple" config switch for reporting the use of "namedtuple", which is an untyped version of "NamedTuple".
New Feature: Added type inference support for list comprehension statements.
New Feature: Improved type inference when indexing into a tuple type with a constant integer index. It now uses the appropriate type for that tuple entry if it's known.
Bug Fix 101: Type inference engine now infers a return type of Generator[Y] for generator functions rather than Iterator[Y].
Bug Fix: Fixed bug that masked type checking operations for certain built-in types like List and Dict.
Bug Fix: For statements now allow iterators that provide `__getitem__`, as per PEP 234.
Bug Fix: Fixed an issue where classes defined with NamedTuple were not providing correct type checks.
Bug Fix: Fixed bug in completion handler that caused completion recommendations to appear when pressing period within a comment.
Bug Fix: Pyright was failing to search beyond the first search path when using fall-back paths from the python interpreter.

1.0.20

This release includes a significant set of changes to the core type engine that are required to enable the next round of functionality. I've done my best to avoid introducing regressions, but they are possible in a change of this size.
One known regression is that unbound or potentially-unbound variables are no longer flagged in many cases.

New Feature: Added new config switch "reportUnknownParameterType" that reports input and return parameters with an unknown type.
New Feature: Added new config switch "reportUnknownVariableType" that reports local variables with an unknown type.
New Feature: Added new config switch "reportUnknownMemberType" that reports class members (instance variables and class variables) with an unknown type.
New Feature: Further improved logging to diagnose import failures.
New Feature: Added "strict mode" that can be enabled on a per-file basis by adding the comment " pyright: strict". This enables all type-checking configuration flags for that file.
New Feature: Added support in type check engine for expression type constraints involving the "or" operator.
Bug Fix 91: Added code to convert file specs passed to command-line from relative to absolute.
Bug Fix: Added code path lookups for both "lib" and "Lib" within virtual environment to accommodate capitalization convention on Windows.
Bug Fix: Removed limitation that type annotation strings not use bytes, unicode or raw strings.

1.0.19

New Feature: Types are now validated for assignments that target objects with a `__set__` method, including properties with setters.
New Feature: Added key/value type inference for dictionary literal statements.
New Feature: Unreachable code is now detected in cases where a return or raise occurs before the end of a code block.
New Feature: Added verbose diagnostic information for import resolution failures. Added `--verbose` switch for command-line tool.
New Feature: Type constraint subsystem is now able to handle more complicated code flow inferences.
Bug Fix: Fixed false positive error related to arg/param matching when an unpacked arg is used.

1.0.18

New Feature: Added type constraint for assert command.
Bug Fix: Fixed bug in parser that allowed an arbitrary number of comma-separated expressions to appear after an assert keyword.
Bug Fix 90: Fixed false error for common arithmetic binary operators that act upon int/float/complex when operand is union with an unknown or any type.
Bug Fix 88: Text completion options shouldn't appear for comments or strings.
Bug Fix: Fixed regression introduced in previous version where the check for max import chain length generated false positives.
Bug Fix: Command-line tool didn't allow the use of "--watch" with a list of specified files.
Bug Fix 89: Fixed regression in tokenizer that caused incorrect line attributes when CR/LF was contained within a string.

1.0.17

New Feature: Improved formatting of errors and warnings for command-line tool.
New Feature: Started to implement type completion for keywords, local variables, module variables, and class/instance variables.
Bug Fix: FIx for 83: Changed the way type analyzer handles assignment statements with type annotation.
Bug Fix: Fix 85, recursion crash due to long import chains.
Bug Fix: Partial fix for 82 (hang)
Bug Fix: Don't flag invalid as errors string escape sequences in raw strings.
Bug Fix: Removed logo from VS Code README.

Page 77 of 81

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.