Pytype

Latest version: v2024.10.11

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

Scan your dependencies

Page 19 of 34

2021.04.15

New features and updates:
* Update typeshed pin to commit ce24720 from Jan 27, and drop support for the
old typeshed directory structure.
* Delete the --check-nonnull-parameter-types flag.

Bug fixes:
* Add "from typing import overload" statement when using overload.
* Add object.__delattr__ to our builtins stubs.
* Add some more support for generic type aliases.

2021.04.09

New features and updates:
* Enable --check-parameter-types by default for non-None default values.
* Add some minimal support for PEP 612 in type stubs.
* Add support for typing.Annotated in pyi files.

Bug fixes:
* Fix a crash when analysed code accessed an undefined closure cell.
* Fix a minor bug in pytype's expansion of Protocol[T].
* Check starargs and starstarargs when gathering TypeVars in function sigs.
* Fix some bugs in pytype's handling of the new typeshed directory structure.
* Make sure `collections.defaultdict.__init__` always accepts kwargs.
* Filter out properties from class attributes when constructing dataclasses.
* Add gi_* fields to Generators.

2021.04.01

New features and updates:
* Add basic Python 3.9 support.

Bug fixes:
* Fully support method aliasing in stub files.
* Improve pytype's handling of sets.

2021.03.22

New features and updates:
* Support inheritance from dataclasses defined in pyi files.

Bug fixes:
* Don't check attribute values against types from pyi files.
* Add a missing array.array.frombytes method.
* Fix the pyi type of attributes annotated with class type parameters.
* Allow annotation-type-mismatch directives to be put on more sensible lines.
* Pass ninja relative paths instead of absolute ones.

2021.03.10

New features and updates:
* Basic support for defining dataclasses in pyi files.
* Enable more of --check-attribute-types by default.
* Get rid of the legacy pyi parser.

Bug fixes:
* Fix a circular import error (760).
* Make NotImplementedType inherit from bool.
* Fix a caching bug that caused incorrect function parameter defaults.

2021.03.03

New features and updates:
* Enable part of --check-attribute-types by default.

Bug fixes:
* Allow callable constants to match protocol methods.
* Allow builtins.tuple to be used for a heterogeneous tuple annotation.
* Don't report [not-instantiable] when instantiating an abstract annotation.
* Take a TypeVar's bound into account when instantiating it in attribute.py.
* Use typeshed stubs in preference to empty stubs.
* Fix a bug where multiple definitions of a TypeVar could end up in a stub.
* Fix a caching bug in check_container_types.
* Fix initialization of Union types in forward references.

Page 19 of 34

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.