Pytype

Latest version: v2024.4.11

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

Scan your dependencies

Page 8 of 34

2023.01.10

Updates:
* Add a new "missing_modules" parameter to load_pytd.create_loader.
* Support putting pytype settings in a pyproject.toml file.
* Add a performance optimisation for outputting the type of large collections.

Bug fixes:
* Add missing int.bit_count method.
* Improve pytype's handling of dict.update.
* Do better matching of overloads in generic classes.
* Show expected type in InterpreterFunction error messages with *args/**kwargs.
* Allow 'self' as a keyword argument to str.format.

2022.12.15

Updates:
* Remove the --overriding-default-value-checks and
--overriding-parameter-name-checks feature flags, which have been no-ops since
the last release.
* Update typeshed pin to commit 78d96cd from July 12.

2022.12.09

Updates:
* PEP 612: Add support for imported ParamSpec and Concatenate instances.
* Update typeshed pin to commit 4e0aacc from July 12.
* Feature flags:
* Remove --mapping-is-not-sequence, which has been a no-op since the last
release.
* Default --overriding-default-value-checks to True.
* Default --overriding-parameter-name-checks to True.

Bug fixes:
* Fix a bug in module resolution in load_pytd.
* Don't let one TypeVar contain another, and keep invalid TypeVars when
possible.
* Support calling super() with a subclass of builtins.type.
* Fix annotation of *args and **kwargs when constructing a SimpleFunction.
* Don't report container errors for late types.
* --always-use-return-annotations: handle coroutines.
* Add missing attributes to typing.TextIO.

2022.11.29

Updates:
* Default --mapping-is-not-sequence to True.

Bug fixes:
* Fix incorrect "Any" count in pytd printer for Callable[nothing, X].

2022.11.18

Updates:
* Allow NoReturn to appear anywhere.
* Add basic TypeGuard support.

Bug fixes:
* Improve imports handling in the pytd printer.
* Do a better job of catching bad parameterized types in pyi files.
* Fix constant folding for python-3.9+ literals compiling to LIST_EXTEND.
* Stop accidentally converting bound to unbound functions.

2022.11.10

Updates:
* Add an optional no-return-any flag to disallow Any as a return type.
* Add a mechanism to allow per-file opting in to feature flags, via a file-level
`features` directive, for example, ` pytype: features=no-return-any`.

Bug fixes:
* Do not let a kwarg in **args interfere with a posonly arg of the same name,
pyi edition.
* Interpret special characters in serialized (pyi or pickle) Literal[""] type
definitions correctly.

Page 8 of 34

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.