Pytype

Latest version: v2024.4.11

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

Scan your dependencies

Page 3 of 34

2023.11.21

Updates:
* Add support for typing_extensions.override.
* Add support for the pax fiddle library.
* Enable --use-enum-overlay by default.

Bug fixes:
* Take arguments passed by keyword into account in Unknown.to_type().
* Don't create extra copies of `None` in convert.py.
* Allow frame locals to be an Unsolvable (Any).
* When making properties, check their arity against require arg count.
* Allow arbitrary AST nodes in typing.Annotated.
* Fix crash caused by assuming parameter names are strings.
* Fix corner case in which decorated setUp method wasn't being analyzed.
* Add missing buffer methods to memoryview.
* Allow functions in pyi files to have any number of decorators.

2023.10.31

Updates:
* Happy Halloween!
* typing.Self: support Self in variable annotations.
* 3.11: Implement typing features Never, clear_overloads, get_overloads,
assert_type, reveal_type, and assert_never.
* Add feature flag --bind-decorated-methods to bind 'self' correctly in
decorated methods.

Bug fixes:
* Fix some corner cases in invalidating an enum tracker.
* Use equality check rather than identity check for recursion detection.

2023.10.24

Updates:
* Add support for typing.Self in method type annotations.

Bug fixes:
* Support pattern matching against a tuple of match variables.
* Fix crash caused by use of a recursive type in a callable.
* When setting a type from assertIsInstance narrow the original type if
possible.

2023.10.17

Updates:
* Remove the --overriding-parameter-count-checks flag. This flag's behavior is
now the default.
* Support enum.StrEnum.
* Support type narrowing for match cases with `as` captures.
* Add basic support for Python 3.11.
* Pytype can now analyze code that does not use any new 3.11 features in 3.11.
* Support for new features will follow over the coming months.

Bug fixes:
* Improve `set` and `frozenset` methods.
* Fix maximum recursion depth error.
* Remove extraneous check in RenameModuleVisitor.

2023.10.05

Updates:
* Default --overriding-parameter-count-checks to True. This flag is now a no-op.

Bug fixes:
* Improve type signatures for set.union.
* Simplify the output of assert_type and reveal_type.
* --strict-undefined-checks: Don't propagate block locals when a block cannot be
exited from.
* Fix various Python 3.11 bugs.

2023.09.27

Updates:
* Update typeshed pin to commit 8597724 from Sep 18.
* Python 3.11: add exception handling.
* Support pattern matching literal sequences.

Bug fixes:
* Take TypeVar substitutions into account when extracting annotations.
* Fix a crash when pattern matching against `Callable()`.
* Apply overlays when loading modules imported in pyi files.
* Don't ignore decorated initializers.
* Add object.__format__ to builtins stubs.
* Export the type stub for attrs.cmp_using.

Page 3 of 34

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.