Pytype

Latest version: v2024.10.11

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

Scan your dependencies

Page 21 of 34

2021.01.08

* Automatically add a .gitignore file to the pytype output directory.
* Do not allow python keywords in pytd files.
* Fix: Don't infer Callable parameters when there are kwonly params.
* Fix: Represent empty tuples as TupleType(()).
* Fix: add __init__ and __contains__ to dict view classes.

2020.12.23

* Support using a union to filter types out of a type parameter.
* Fix the attribute type obtained from `attr.ib(default=())`.

2020.12.16

* Support NewType in stubs.
* Treat classes whose metaclass inherits from type(Protocol) as abstract.
* Automatically promote __init_subclass__ to a classmethod.
* Improve unpacking and function arg matching by tracking unpacked iterables.
* Fix a [name-error] caused by a bad regex check for comprehensions.
* Strip carriage returns from files read as bytes.
* Support using an AnnotationClass in an isinstance check.
* Support aliases to methods of classes in the same module in the pyi parser.

2020.12.02

* Update typeshed pin to commit fae6bda from October 12.
* Improve the [bad-return-type] error message.

2020.11.23

* Treat modules as hashable.
* Support typing_extensions.Literal in source files.
* Take classmethods and staticmethods into account in protocols.

2020.11.12

* Support ` type: ignore[errorcode, ...]` in pyi files.
* Always allow classes to match typing.Hashable.
* Fix a bug in pytype's handling of Literal[<str>].

Page 21 of 34

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.