Pytype

Latest version: v2024.10.11

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

Scan your dependencies

Page 18 of 34

2021.05.19

New features and updates:
* Add support for PEP 604 (Union |) in stub files.

Bug fixes:
* Get rid of special_builtins.Filter.
* Fix circular import issues in the pytd loader.

2021.05.14

New features and updates:
* Allow TypeGuard to be used in type stubs by rewriting TypeGuard[X] to bool.

Bug fixes:
* Fix the order of inherited attributes for dataclasses.
* Change the type of __path__ from Iterable to List.
* Add a replace() method to flax dataclasses.

2021.05.11

Bug fixes:
* Report [not-supported-yet] instead of [import-error] for importing TypedDict.
* Fix a bug in attribute lookup from parent classes.
* Fix a Python 3.7 failure in typeshed/tests/pytype_test.py.
* pytd: populated mutated_type from annotated `self` parameters.
* Preserve kw_only attribute when inheriting attrs from a different module.
* Add a vm state to allow recursive construction of pytd values.

2021.05.06

New features and updates:
* Update typeshed pin to commit 2c8cb60 from Apr 27.

Bug fixes:
* Add typing._Alias.
* Pin attrs to 20.3.0.

2021.05.04

New features and updates:
* Remove --check-attribute-types, --check-container-types, and
--check-variable-types flags. Their behaviors are now enabled by default.
* Add a temporary --preserve-union-macros flag that preserves Union generic type
aliases in type stubs. This behavior will ultimately be enabled by default and
the flag removed.
* Support max versions in typeshed VERSIONS file.

Bug fixes:
* Add typing.GenericMeta stub.
* Fix handling of typeshed/stdlib/python2.

2021.04.26

New features and updates:
* Enable --check-attribute-types, --check-container-types, and
--check-variable-types by default. These flags will soon be removed.
* Add a fix suggestion for [annotation-type-mismatch] with a None value.
* Add a temporary --attribute-variable-annotations flag that applies PEP
526-style annotations on attribute assignments. This behavior will ultimately
be enabled by default and the flag removed.
* Add a temporary --create-pyi-dataclasses flag that creates dataclasses from
dataclass-annotated classes in type stubs. This behavior will ultimately be
enabled by default and the flag removed.

Bug fixes:
* Don't lose track of attributes when typing.final is used.
* Fix generation of type information for nested typing.NamedTuple classes.
* Fix some bugs in handling of generic type aliases.
* Fix a pytype crash on a generic protocol.
* For method aliasing in pyi files, consider base classes when doing lookup.

Page 18 of 34

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.