Pytype

Latest version: v2024.10.11

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

Scan your dependencies

Page 4 of 34

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.

2023.09.19

Updates:
* Update typeshed pin to commit ce222e5 from Jun 12.
* pytype-single: Add --no-validate-version flag to disable Python version
checks. This makes testing not-yet-supported versions easier.
* Remove max version requirement for installing pytype. This prevents accidental
installation of very old versions of pytype that don't have this requirement.
Pytype itself still emits an error upon encountering an unsupported version.
* Use pycnite for bytecode processing.

Bug fixes:
* Fix a corner case in ParamSpec matching for a class with a __call__ method.
* Python 3.11:
* Fix implementations of several 3.11 opcodes.
* op.next should not point backwards even if the op is a backwards jump.
* Track undecorated functions for better handling of TypeVars in signatures.
* Fix 'TypeVar not in scope' check for imported TypeVars.

2023.09.11

Updates:
* Preserve the line number of del statements to use in error messages.

Bug fixes:
* Never discard user-provided overloads in output.py.

2023.08.31

Updates:
* Support typing.is_typeddict.
* Change how pytype handles `isinstance(..., Any)`.
* Allow class-scoped TypeVars in classmethods.

Bug fixes:
* Filter out non-visible bindings in vm._unpack_sequence.
* Use the alias name for resolving property decorators.
* Don't collapse long unions containing literals.
* Update pytd printer's treatment of `cls` annotations to match `self`.
* Clear out any `self` annotation before a function recursively calls itself.
* vm: fix narrowing for unittest assertions.

2023.08.22

Bug fixes:
* Report more position information for type stub parse errors.
* Handle aliases in type stubs more consistently.

Page 4 of 34

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.